I have two radio buttons. I would like to be able to get the value of the custom attribute "xmlvalue" of the checked radio button.
I have tried with the following script:
var userType = $("input[name=ctrl_CustomerType]:checked", this).attr('xmlvalue');
Markup:
<input type="radio" name="ctrl_CustomerType" id="ctrl_CustomerType_1" xmltag="CustomerType" xmlvalue="existingCustomer" checked="checked"> Yes
<br />
<input type="radio" name="ctrl_CustomerType" id="ctrl_CustomerType_2" xmltag="CustomerType" xmlvalue="newCustomer"> No
-- But I keep getting "Undefined".
Any ideas?