Skip to main content

Adding a "name" attribute

2 replies [Last post]
edwingo
Offline
Joined: 2003-06-10
Points: 0

I am working with the scriptaculous autocompleter and would like a page submit to post a value for the field. Is there an easy way to render a "name" attribute with the tag that the autocompleter renders?

-Edwin

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi Edwin,

You could go back into the component.htm and add it there. If you need something unique you may want to use the unique id for the widget ${} uuid in the name.

I noticed that the input field having the actual widget id which is probably a mistake as we need a higher level wrapper.

What did you hope to do with the name attribute? Wouldn't it better to deal with an IE where you have the ability to look it up using the JavaScript DOM apis?

edwingo
Offline
Joined: 2003-06-10
Points: 0

> Hi Edwin,
>
> You could go back into the component.htm and add it
> there. If you need something unique you may want to
> use the unique id for the widget ${} uuid in the
> name.
>
>

>
>
> style="display:none;border:1px solid
> black;background-color:white;">

>

Thanks for the info, it worked.

>
> I noticed that the input field having the actual
> widget id which is probably a mistake as we need a
> higher level wrapper.

For me, it's fine the way it is.

>
> What did you hope to do with the name attribute?
> Wouldn't it better to deal with an IE where you have
> the ability to look it up using the JavaScript DOM
> apis?

Yup, you could do a 100% ajax solution. However, I can also see a scenario where a user fills out form fields on a page with ajax-enabled autocomplete for each field. When the form is complete, then they could submit the entire form using a normal page submit. The input "name" attributes allow the values of the fields to be submitted to the server for further processing.

-Edwin
PS: Sorry for the slow reply, I'm still getting used to using the forum.