wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes using window.location ???? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "using window.location ????" Watch "using window.location ????" New topic
Author

using window.location ????

Tom Hopkins
Greenhorn

Joined: Aug 10, 2001
Posts: 14
I'm working on an app where one frame calls a servlet that does an xsl:sort to update an html doc. I'm using 'response.sendRedirect' to bring me back to the frame that called the servlet, but then I need to refresh the frame that displays the html that was just updated. I've been using 'parent.framename.location = relativeURL' to accomplish this, but with limited success. It seems to work only on every second update. I know the transform is successful and the html is updating every time, but the display frame doesn't update. I also dont' think its a caching problem, as I'm using
<META CONTENT="-1" HTTP-EQUIV="Expires">
<META CONTENT="no-cache" HTTP-EQUIV="Pragma">
<META CONTENT="no-cache" HTTP-EQUIV="Cache-Control">
<META CONTENT="no-store" HTTP-EQUIV="Cache-Control">
in the head of the html doc. So is there another way to do this?
Thanks in advance
Tom Hopkins
Greenhorn

Joined: Aug 10, 2001
Posts: 14
Thanks anyway, got it.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
What was the problem?
Tom Hopkins
Greenhorn

Joined: Aug 10, 2001
Posts: 14
You know I'm still not sure why this isn't working because I've used window.location=... before for similar purposes. I can only imagine it may have been a synchronization issue where perhaps the updated file was not available in time for the call to window.location. But thats just a guess. Anyway, I ended up setting the target attribute of the form I'm submitting to indicate the frame which should ultimately hold the resulting html and everything works fine (every time). Probably should have thought of this sooner.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: using window.location ????
 
Similar Threads
how to prevent caching in IE 6
jsp, j2me,wap,(related with wap ,wml developers)
Browser Back Button
redirect from servlet
Simple scriplet, does this violate model 2?