I'm fairly new to javascript. I have a web intranet application that calls my maxwindow function in the body's onload
The page initially loads fine but when you go back to the page by the back button or refresh an "access is denied" error alert pops up. Below is the code for the function
The error points to the self.moveto(0,0) line. This error happens in IE 6, I haven't tested in Netscape etc, because everyone who is accessing the app should be using IE.
Is it possible to determine if it is already at 0,0 and skip over that line.
Thanks in advance for any help
Code:
<body onload="maxWindow('')">
The page initially loads fine but when you go back to the page by the back button or refresh an "access is denied" error alert pops up. Below is the code for the function
Code:
function maxWindow(lEdit)
{
if (lEdit =="NoEdit") {
alert('Unable to edit Record is locked by another user');
}
self.moveTo(0,0);
self.resizeTo(screen.width,screen.height);
}
The error points to the self.moveto(0,0) line. This error happens in IE 6, I haven't tested in Netscape etc, because everyone who is accessing the app should be using IE.
Is it possible to determine if it is already at 0,0 and skip over that line.
Thanks in advance for any help