ShaneBrennan
Programmer
Hi Everyone.. I think I've got brain freeze.
I'm using bootstrap version 3 and I have 2 radio button on a modal with the id "closeProjectDetails".
The code for the radio buttons is:
<div class="control-group btn-group row">
<label class="btn btn-default">
<input type="radio" name="closeOrCancel" value="close" />
<span>Closing</span>
</label>
<label class="btn btn-default">
<input type="radio" name="closeOrCancel" value="cancel /">
<span>Cancelling</span>
</label>
</div>
All I'm trying to do is retrieve the selected value "close" or "cancel"
I found this function on this forum:
function getRadioValue(grp) {
var radioIndex = getSelectedRadio(grp);
if (radioIndex != -1) {
return grp[radioIndex].value ;
}
else {
return -1;
}
}
and tried to use the following to retrieve the value neither of which worked:
theData.closeOrCancel = getRadioValue(closeProjectDetails.closeOrCancel) ;
theData.closeOrCancel = getRadioValue(closeOrCancel) ;
I know it's probably something simple.... but brain hurts and can't work the thing out.
Thank you in advance for any assistance you can give.
Shane Brennan
I'm using bootstrap version 3 and I have 2 radio button on a modal with the id "closeProjectDetails".
The code for the radio buttons is:
<div class="control-group btn-group row">
<label class="btn btn-default">
<input type="radio" name="closeOrCancel" value="close" />
<span>Closing</span>
</label>
<label class="btn btn-default">
<input type="radio" name="closeOrCancel" value="cancel /">
<span>Cancelling</span>
</label>
</div>
All I'm trying to do is retrieve the selected value "close" or "cancel"
I found this function on this forum:
function getRadioValue(grp) {
var radioIndex = getSelectedRadio(grp);
if (radioIndex != -1) {
return grp[radioIndex].value ;
}
else {
return -1;
}
}
and tried to use the following to retrieve the value neither of which worked:
theData.closeOrCancel = getRadioValue(closeProjectDetails.closeOrCancel) ;
theData.closeOrCancel = getRadioValue(closeOrCancel) ;
I know it's probably something simple.... but brain hurts and can't work the thing out.
Thank you in advance for any assistance you can give.
Shane Brennan