Hi,
I have an asp DropDownList and I'm trying to pass its selected value to javascript.
Like this:
I then have a js file that tries to get that value selected:
But the value selected is not getting passed. Could someone help me figure out why?
Thank you!
I have an asp DropDownList and I'm trying to pass its selected value to javascript.
Like this:
Code:
this.DropDownList.Attributes.Add("onclick", "showDiv(this)");
I then have a js file that tries to get that value selected:
Code:
var i = null;
function showDiv(obj)
{
i = obj.options[obj.selectedIndex].value;
}
But the value selected is not getting passed. Could someone help me figure out why?
Thank you!