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

syntax for select box value 1

Status
Not open for further replies.

onressy

Programmer
Joined
Mar 7, 2006
Messages
421
Location
CA
<select name="addSpecialtyID" onChange="setVal();">
option....
</select>

im trying to set value of hidden text field addSpecialtyID_ to the select addSpecialtyID value, how do i address the select box for its value? thanks

<script>
function setVal() {
document.manageQuotaForm.addSpecialtyID_.value=document.manageQuotaForm.addSpecialtyId.value;
}
</script>
 
> how do i address the select box for its value?
[tt]
<select name="addSpecialtyID" onChange="setVal([blue]this[/blue]);">

function setVal([blue]obj[/blue]) {
[blue]obj.form[/blue].addSpecialtyID_.value=[blue]obj[/blue].value;
}
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top