-
Hi -
Can someone tell me how I can call a Javascript function with a parameter based on the value of the selected drop down list element...
e.g. the code I have right now:
<form name="songs">
<SELECT NAME="audioid" SIZE=1 onChange="location = javascript
penOne('document.songs.audioid[document.songs.audioid.selectedIndex].value');">
However this doesn't work. Can you spot the error and let me know?
Thanks!
-
Sorry...this is the code I'm using..
The javascript error is: "Object Required" (HUH?)
<form name="songs">
<SELECT NAME="audioid" SIZE=1 onChange="javascript
penOne(document.songs.audioid[document.songs.audioid.selectedIndex].value);">
<OPTION VALUE=100>
</SELECT>
</form>
-
I think I've spotted the error - it's the yawning face in your code. But seriously, remove the 'javascript' from your onChange.
onChange="openOne(document.songs.audioid[document.songs.audioid.selectedIndex].value);">
Post the function here if you're still getting an error. The "object required" error could be in the function.
-
Hi Scrubz -
I figured out the error. It was actually the fact that I didn't declare Javascript as a script in my <head> for the page on top.
Thanks for the reply!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks