I want my drop down lists to give me more than one value in return... Typically it looks like this, right?:
<option value="something">something else</option>
So what I want is something that giver me yet another 'something' so that the form element can give me more information than _just_ its selected value... possibly something like...
<option value="something" value2="another something">something else</option>
Is it possible to do something like this? How?
OR...
Is there a way I can get a the "item name" of the value in question, sort of like replacing:
code += window.document.my_form.my_list.value
with something like
code += window.document.my_form.my_list.item.name
I've tried looking it up in all sorts of forums and books (JavaScript Bible etc) with no success, so I'd be truly greatful for any help. Credit will of course be given in the finished product to anyone who has 'the' solution.
Thanks,
-torb
<option value="something">something else</option>
So what I want is something that giver me yet another 'something' so that the form element can give me more information than _just_ its selected value... possibly something like...
<option value="something" value2="another something">something else</option>
Is it possible to do something like this? How?
OR...
Is there a way I can get a the "item name" of the value in question, sort of like replacing:
code += window.document.my_form.my_list.value
with something like
code += window.document.my_form.my_list.item.name
I've tried looking it up in all sorts of forums and books (JavaScript Bible etc) with no success, so I'd be truly greatful for any help. Credit will of course be given in the finished product to anyone who has 'the' solution.
Thanks,
-torb