Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.selectedIndex ??

Status
Not open for further replies.

moogwai

Programmer
Mar 6, 2002
11
US
I am having an issue with my validation function. Specificly in Netscape. It is not liking my code for checking a dropdown list.

if (document.forms[0].State.value == "")

I have also tried some ".selectedIndex" versions to no avail. My error keeps reading that "document.forms[0].State.value has no properties".
Is there is simple naming convention I am missing out on? How should I go about checking the value of a dropdown? Any help is graetly appreciated.
Thanks for your time,
Moogwai
 
In researching the other posts I found the answer. Thanks and sorry for the wasted space. The issue was putting state[0].selected instead of simply state.whatever.
Regards... Moog.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top