wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes selectedIndex in a Select Box error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "selectedIndex in a Select Box error" Watch "selectedIndex in a Select Box error" New topic
Author

selectedIndex in a Select Box error

Kevin Cornwell
Ranch Hand

Joined: Feb 01, 2005
Posts: 34
This is a autocomplete script that works with a textbox and a select box. It works fine for the most part, however when I clear the textbox (by back spacing, or delete button) it will load the select box with a blank entry (the select IS populated). When the script get to the bottom where I test for the selectedIndex value, it crashes ("Object doesn't support this property or method"). Even a alert crashes it. It seems to load the select with another option but without a index???

Suggestions?

Thanks,
Kevin C.



<a href="http://www.kevincornwell.com" target="_blank" rel="nofollow">http://www.kevincornwell.com</A>
Kevin Cornwell
Ranch Hand

Joined: Feb 01, 2005
Posts: 34
got it. on...
 
jQuery in Action, 2nd edition
 
subject: selectedIndex in a Select Box error
 
Similar Threads
Like search engine
Making a google like suggest out of html controls.
Java Script problem
javascript access fieldset children
Problem with validator-rules.xml JavaScript