Hi
I have a dropdown populated by my recordset. I pass the value of the dropdown to a onchange function using 'this.value'. Is there a way I can send the Name that's displayed to the function instead, WITHOUT assigning it to the value property of the select?
Here is my dropdown
and my javascript function
Thanks in advance
I have a dropdown populated by my recordset. I pass the value of the dropdown to a onchange function using 'this.value'. Is there a way I can send the Name that's displayed to the function instead, WITHOUT assigning it to the value property of the select?
Here is my dropdown
Code:
Response.Write "<td><select id=drpGroup name=drpGroup class=dropdown size=1 onchange=Onchange_Group(this.value);>"
do while not rs2.eof
Response.Write "<option value=" & rs2("iRoleId") & " selected>" & rs2("vRoleDescription") & "</option>"
rs2.movenext
loop
and my javascript function
Code:
function Onchange_Group(value)
{
alert(value); //this will give me the roleId and not the role description
}
Thanks in advance