问题
I'm trying to figure out of this radio button is checked No or Yes or has not been checked yet..
<s:if test="%{! #session['_rbc_session_client_information_complete_prompted_']}">
<div class="form-inline loba-radio-inline">
<span><s:text name="applicantInfo.infoComplete.msg"/></span>
<s:radio id="infoComplete" name="infoComplete" value=""
list="#{getText('rbc.no.key'):getText('rbc.no'),
getText('rbc.yes.key'):getText('rbc.yes')}" />
</div>
</s:if>
I have a continue button on the same page that calls changeRBC_RIP_G04()
However, i keep getting false, even if nothing is selected, if i reverse the radio button order, i get true.. I want to know when its unchcked...
function changeRBC_RIP_G04()
{
var selectedValue = $('input[name=infoComplete]:checked').val();
if (selectedValue == 'false')
{
$('#RBC-MSG-011-modal').modal('show');
}else {
window.location='rbcDetailPage?newApplication=true'+selectedValue;
}
};
the S tages are from struts 2
来源:https://stackoverflow.com/questions/18992001/radio-button-remove-default-value-in-js