Need help with JS obejcts/values!
I have a form named FORM and a SELECT within the form (i.e. a drop-down menu) named SELECT. In the INPUT line I have type="button" language="JavaScript" and onClick="self.location=document.form.select.value"
I want to set self.location equal to the value of the select menu item. (I know the self.location works because if I hardcode a value it works when I click the input button)
Problem: The value of document.form.select.value is always comming back as null.
What am I doing wrong??
Thanks!
Mark Hensler posted this at 06:26 — 10th December 2000.
He has: 4,048 posts
Joined: Aug 2000
try using alert() to debug it.
onClick="alert('the value is:' + document.form.select.value)"
something else to try, put value="something" in your
like:
choice 1
choice 2
choice 3
Mark Hensler
If there is no answer on Google, then there is no question.
Jaiem posted this at 01:50 — 11th December 2000.
They have: 1,191 posts
Joined: Apr 1999
Got it!
Here's what the input line is:
Nasty isn't it?!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.