File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Javascript resize issue in IE" Watch "Javascript resize issue in IE" New topic

Javascript resize issue in IE

Thomas Greene
Ranch Hand

Joined: Aug 09, 2004
Posts: 127
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

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.

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

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

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

I agree. Here's the link:
subject: Javascript resize issue in IE
It's not a secret anymore!