[thelist] JavaScript Validation for Pull-Down Menus and Radio Buttons
Jono
ox4dboy at comcast.net
Wed Dec 8 10:27:25 CST 2004
On Dec 8, 2004, at 10:41 AM, Mark Kennedy wrote:
> If 'obj' is an HTML select object, then
>
> obj.value
>
> ...is undefined. You have to use
>
> obj.options[ obj.selectedIndex ]
>
> to get a handle to an HTML option object. So you could do:
>
> obj.options[ obj.selectedIndex ].value
>
> to get the selected value of the field.
>
> Hope that helps
>
> Mark
[snip1]
You have to use
obj.options[ obj.selectedIndex ]
[/snip1]
----> How and where?
[snip2]
So you could do:
obj.options[ obj.selectedIndex ].value
[/snip2]
----> How and where?
I can't quite follow what needs to be done above. I think I should add
that I know very little about Javascript, and am stuck doing this in
an emergency situation. Also, there are 4 different Radio button areas
in the form, and 2 different pull-down menus that I need to check.
If you could please be very clear in explanations that would be most
helpful. Thank you for the suggestions thus far!
More information about the thelist
mailing list