Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic Refresh of New Window

Status
Not open for further replies.

tempoman

Programmer
May 9, 2000
41
0
0
AU
Can someone help me with my problem.

I have a form which is opened as a new window for people to submit new details. People can then close the window after it has been update. My problem is that if they click to update these fields again, the new values are not updated in the new window with a cfquery top of the page, you need to refresh to get the old values. Is there a way I can set it so I don't need to refresh the page.

Thank You

Richard

My script for opening a new window:

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>

function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
win.window.focus();
}
</script>
 
Is it possible something's being cached without your knowledge and users are being given the old version from the cache?

It sounds like Refresh solves the problem, so it's worth checking whether users are being given cached pages by a proxy server. If so, one solution is to add a query parameter with a random value to the URL of the pop-up window, e.g. mysite.mypage.htm?myparam=randomnumber - this will make the proxy server think a differnt page is being requested each time and it will request a fresh version of the page from the host.

The only other thing I can see that might be cached is the query. I think this is less like becasue I don't see how refreshing the page would help in this case. But it might be worth checking if the cause does not turn out to be a proxy server.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top