File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Javascript resize issue in IE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Javascript resize issue in IE" Watch "Javascript resize issue in IE" New topic
Author

Javascript resize issue in IE

Thomas Greene
Ranch Hand

Joined: Aug 09, 2004
Posts: 126
I am maintaining a site written in JSP. In each page in the body tag there is a call to a javascript function.

<body onresize1="est_restorePage();" onload1="..." >
....


This function is there in a .js file

function est_restorePage(){
if (!((navigator.appName == "Netscape")&&(parseInt(navigator.appVersion)==4))) // prevents Netscape 4 Resize-Bug
window.history.go(0);
}


The problem by doing this is that, in IE when ever the page is resized

1. The page is refreshed
2. I get a alert message saying
"The page cannot be refreshed without resending the information. Click Retry to send the information again, or click Cancel to return to the page that you were trying to view"

Please tell me why this is happening and how to get rid of this problem. Also, if I remove the call to this JS function will it cause some problem in some other browser.

Thanks
[ October 25, 2006: Message edited by: Thomas Greene ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
That is because you psted information to get to that page.

document.location.href = document.location.href;

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Javascript resize issue in IE