OhLordy
05-15-2003, 11:17 AM
Hi I have the following script in an included file called validation.js
alert("here we are now");
function checklength(s,l) {
if(s.value<l) {
alert("This field must be at least ".l." character(s) long");
return false;
} else {
return true;
}
}
then in the actual file i have a form, and on one of the form elements I have
<input type="text" name="name" value="<?=$row_main["product_name"]?>" onBlur="checklength(this.value);">
Now I don't get an alert saying "here we are now" when I load the page up, so does this mean that the file is not getting loaded at all?
Thank you in advance
Rob
alert("here we are now");
function checklength(s,l) {
if(s.value<l) {
alert("This field must be at least ".l." character(s) long");
return false;
} else {
return true;
}
}
then in the actual file i have a form, and on one of the form elements I have
<input type="text" name="name" value="<?=$row_main["product_name"]?>" onBlur="checklength(this.value);">
Now I don't get an alert saying "here we are now" when I load the page up, so does this mean that the file is not getting loaded at all?
Thank you in advance
Rob