Skyzyx
08-23-2002, 09:22 PM
I have designed a custom error message box for one of my websites. I have set it up, so that if there is an error on the page, it will trigger a script that opens a new window... etc.
Here is an example:
function errorReport()
{
var errorContent=''; // To clear the variable.
errorContent+='<html><body>';
errorContent+='This Is My Error Message<br>';
errorContent+='</body></html>';
var errWin=window.open('', 'errorWindow', 'width=650,height=300');
errWin.document.write(errorContent);
errWin.focus();
}
window.onerror=errorReport;
This part works all fine and dandy.
The problem is that if I have 2 errors on a single page, the error message window will double-draw. If I have 3 errors on a single page, it will triple-draw.
My question is, is there a way to only make the error message popup once, regardless of how many errors there are?
For an example, go to www.GoldenRuleProduce.com, and in the location bar type something like:
javascript:document.write('
This will trigger the error message, but it also causes another error to occur, and the error message double-draws.
Any help would be appreciated.
Here is an example:
function errorReport()
{
var errorContent=''; // To clear the variable.
errorContent+='<html><body>';
errorContent+='This Is My Error Message<br>';
errorContent+='</body></html>';
var errWin=window.open('', 'errorWindow', 'width=650,height=300');
errWin.document.write(errorContent);
errWin.focus();
}
window.onerror=errorReport;
This part works all fine and dandy.
The problem is that if I have 2 errors on a single page, the error message window will double-draw. If I have 3 errors on a single page, it will triple-draw.
My question is, is there a way to only make the error message popup once, regardless of how many errors there are?
For an example, go to www.GoldenRuleProduce.com, and in the location bar type something like:
javascript:document.write('
This will trigger the error message, but it also causes another error to occur, and the error message double-draws.
Any help would be appreciated.