Paul Thompson wrote:
I am getting an odd, inscrutable error in Mozilla Firefox. When I use
an array to shift focus to an element, I get the error
<snip> 1) How do I interpret this error?
2) Is there some error dictionary or something for FireFox?
- A quick look shows that you're missing a lot of semicolons.
- You have multiple variable declarations for the same variable in this
function:
function chkV(f,fnm,chkval) {
var retval=0;
...
var retval=1;
-IN the functions CSV, CSVx, CVBx, CSVval, fixblank, clkH, CBV, showall
I'd recommend using "var" before the loop counter, e.g.
for (i=0; i < zmaxv; i++) .... for (var i=0; i<zmaxv; i++}
-In the functions CBV and CVBx, in the loops, why not return as soon as
a selected button's value is found. And maybe eliminate retv using
something like:
http://www.breakingpar.com/bkp/home....256AFB0013E5E9
function getSelectedRadio(buttonGroup) {
//returns the array number of the selected
//radio button or -1 if no button is selected
for (var i=0; i<buttonGroup.length; i++) {
if (buttonGroup[i].checked) {
return i;
}
}
// if we get to this point, no radio button is selected
return -1;
}
-The FAQ for this group has Left Trim and Right Trim functions, if you
want to take a look at them:
function LTrim(str) {
for (var k=0; k<str.length && str.charAt(k)<=" " ; k++) ;
return str.substring(k,str.length);
}
function RTrim(str) {
for (var j=str.length-1; j>=0 && str.charAt(j)<=" " ; j--) ;
return str.substring(0,j+1);
}
function Trim(str) {
return LTrim(RTrim(str));
}
I don't know if these will fix your problem, but I think they're
generally good advice. If they don't fix the problem, how about posting
the url of the page that uses that script?
Good Luck,
Mike