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

Assign 2 variable

Status
Not open for further replies.

paradis222

Programmer
Oct 20, 2002
12
0
0
HK
can i assign two variable if i choose a product in a drop down box ?
like if i choose Product A in drop down box, the value of product will be assigned as "A" and the ID No will be assigned as "1" and so on..!
 
Code:
<select onChange='var product=this.value;var idNum=this.selectedIndex;'>
<option value='A'>Whatever
<option value='B'>Yea Yea..
</select>

hope it helps &quot;Those who dare to fail miserably can achieve greatly.&quot; - Robert F. Kennedy
So true..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top