• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javascript resize issue in IE

 
Thomas Greene
Ranch Hand
Posts: 127
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is because you psted information to get to that page.

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

Eric
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic