Hi,
I'm fairly new to javascript. I'm trying to write a script to check whether an input is numeric or not and do a different thing depending on the result
at the moment i'm trying this:
if (isNumeric(document.selector.branchid.value)){
searchlink = searchlink + "&branchid=" + document.selector.branchid.value;
} else {
searchlink = searchlink + "&branchid=" + 0;
}
i get the error "Object expected" on the line with the if statement.
can anyone tell me where i'm going wrong.
thanks
Emma
I'm fairly new to javascript. I'm trying to write a script to check whether an input is numeric or not and do a different thing depending on the result
at the moment i'm trying this:
if (isNumeric(document.selector.branchid.value)){
searchlink = searchlink + "&branchid=" + document.selector.branchid.value;
} else {
searchlink = searchlink + "&branchid=" + 0;
}
i get the error "Object expected" on the line with the if statement.
can anyone tell me where i'm going wrong.
thanks
Emma