by gecko68 » Sat Aug 19, 2006 1:47 pm
Here is a work around for the problem with Firefox/Google AutoFill
Prior to submitting (in the onsubmit) I call the following function.
It loops through the form and validates each field one last time.
Please note : In my code, I do not validate hidden, radio , or image types.
function dblcheckFormValidation()
{
var inputFields = document.getElementsByTagName('INPUT');
var inputs = new Array();
for(var no=0;no<inputFields.length;no++){
inputs[inputs.length] = inputFields[no];
}
for(var no=0;no<inputs.length;no++){
if (inputs[no].getAttribute('type') != 'radio' && inputs[no].getAttribute('type') != 'image' && inputs[no].getAttribute('type') != 'hidden') {
validateInput(null,inputs[no])
}
}
}