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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

select code not working in netscape

Status
Not open for further replies.

redgenie

Programmer
Aug 10, 2000
36
GB
i have the following select element:<br><br>&lt;select name=&quot;AvailableLists&quot; size=&quot;10&quot; onClick=&quot;updateDescription(this.form)&quot;&gt;<br>&lt;option value=&quot;1&quot;&gt;General&lt;/option&gt;<br>&lt;option value=&quot;2&quot;&gt;Discworld&lt;/option&gt;<br>&lt;option value=&quot;3&quot;&gt;Spellbound&lt;/option&gt;<br>&lt;option value=&quot;4&quot;&gt;Myth and Magic&lt;/option&gt;<br>&lt;option value=&quot;5&quot;&gt;Enchantica&lt;/option&gt;<br>&lt;option value=&quot;6&quot;&gt;Pocket Dragons&lt;/option&gt;<br>&lt;option value=&quot;7&quot;&gt;Canterbury Bears&lt;/option&gt;<br>&lt;option value=&quot;8&quot;&gt;Steiff Bears&lt;/option&gt;<br>&lt;/select&gt;<br><br><br>when i use the following function:<br><br>function updateDescription(theForm){<br>theForm.descriptionField.value = MailListDescription[theForm.AvailableLists.options[theForm.AvailableLists.SelectedIndex].value]<br>}<br><br><br>It works fine in IE but gives the following error message in Netscape:<br><br>theForm.AvailableLists.options[theForm.AvailableLists.SelectedIndex]<br>has no properties.<br><br>I am a little stuck to say the least, are there any other ways i can address this that will work in both explorer and netscape?
 
&gt; theForm.AvailableLists.options[theForm.AvailableLists.SelectedIndex].value<br><br>Should be<br><br>theForm.AvailableLists.options[theForm.AvailableLists.selectedIndex].value<br><br>Javascript is case sensitive, even in IE5 it is an error.<br><br>Hope this helps<br>-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top