Hi
I'm calling a javascript function from an asp.net page and need to test a value. I'm running this bit of code..
..so that I can test the value of a .net radio button control. The control has the values "Yes" and "No", but whichever one I select the alert always says 'undefined'. If I do the same test with a text box e.g.
..it works fine and returns the value. Can anyone tell me why and therefore how I can access the value of a .net radio button list in javascript.
Thanks a lot
P.s. I've tried posting a similar problem in the javascript forum and no-one seemed to be able to help.
Matt
Brighton, UK
I'm calling a javascript function from an asp.net page and need to test a value. I'm running this bit of code..
Code:
alert(document.getElementById("rblUKResident").Value);
..so that I can test the value of a .net radio button control. The control has the values "Yes" and "No", but whichever one I select the alert always says 'undefined'. If I do the same test with a text box e.g.
Code:
alert(document.getElementById("txtName").Value);
..it works fine and returns the value. Can anyone tell me why and therefore how I can access the value of a .net radio button list in javascript.
Thanks a lot
P.s. I've tried posting a similar problem in the javascript forum and no-one seemed to be able to help.
Matt
Brighton, UK