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

Javascript inconsistencies

Status
Not open for further replies.

secretsquirrel

Programmer
Mar 22, 2001
202
GB
Hi guys, I hope you can help me.

I've got a page with a Javascript function in it, which basically displays a hidden <DIV> when a certain value is selected from a dropdown list. This works with no problems.

The thing that's bugging me is the fact that I needed to use the same function on another page, so I pasted it into the new page and made sure all the associated elements were named correctly (the <DIV>, the <SELECT> and the <FORM> that the whole lot sits in), but when I run the page and change the selected item in the list, I get an error which is along the lines of &quot;form.dropdownlist.selectedIndex is not an object&quot;.

The irritating thing is that it works perfectly in the original page. Has anyone else experienced anything like this, or do you have any suggestions.

Thanks in advance.
 
you really should double check your code
you must be missing something, or mispelling something
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top