Hey all,
I have a simple function which submits a form when a radio-button is clicked:
You'll notice I used (+'') to type-cast the frmActionID var to a string. The original looked like this:
In the original statement, when frmActionID was zero (int zero, not string), the 'if' stmt returned false. Any number other than zero returned true. Does JS view zero (0) as an empty string?
I have a simple function which submits a form when a radio-button is clicked:
Code:
function submitAccessForm(frmAction, frmActionID){
if ((frmActionID+'') != ''){
document.getElementById('frmAction').value = frmAction;
document.getElementById('frmActionID').value = frmActionID;
document.getElementById('step3form').submit();
}
}
Code:
if (frmActionID != ''){
Comment