I created a generic function on the <head> level of my page to capture any errors that a user may receive. Whe I am unsure of is how would I cancel the [FONT=Courier New]form.submit[/FONT] method from submitting data if an error is captured from the window.onerror event. Below is my code for the event.
[FONT=Courier New]window.onerror = function handleError(sMessage, sUrl, sLine){
alert(“An error has occured with this application. Please take a screen shot ofnthis error and email to the help desknn”
+ “Description: ” + sMessage + “nnURL: ” + sUrl + “nnLine Number: ” + sLine);
return true;
}[/FONT]
part of my form’s code
[FONT=Courier New]<form
action=”
onSubmit=”return validateForm(this);” onReset=”return resetForm(this);”>[/FONT]