M
Max
Hello group,
I use this function to find the value of a radio group:
function valButton(btn) {
var cnt = -1;
for (var i=btn.length-1; i > -1; i--) {
if (btn.checked) {cnt = i; i = -1;}
}
if (cnt > -1) return btn[cnt].value;
else return null;
}
I however found an incompatibility with Internet Explorer, when the
radio group name contains brackets. For example, the radio group name
is '1234[a]'. The Ms Script Debugger stops on btn.length, saying that
it is null or not an object. You may also want to know that it works
well in Firefox and Safari.
Does anyone knows any way I can get IE to digest this? Do you know
another way to acquire radio group value?
Thanks,
Max
I use this function to find the value of a radio group:
function valButton(btn) {
var cnt = -1;
for (var i=btn.length-1; i > -1; i--) {
if (btn.checked) {cnt = i; i = -1;}
}
if (cnt > -1) return btn[cnt].value;
else return null;
}
I however found an incompatibility with Internet Explorer, when the
radio group name contains brackets. For example, the radio group name
is '1234[a]'. The Ms Script Debugger stops on btn.length, saying that
it is null or not an object. You may also want to know that it works
well in Firefox and Safari.
Does anyone knows any way I can get IE to digest this? Do you know
another way to acquire radio group value?
Thanks,
Max