473,320 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

location.replace

I have the following situation. On one page, a user clicks on a link
which triggers a server-side program to generate the requested output
PDF. Depending on the specifics of the PDF being generated, this process
may take some time. When the triggering process is complete, the server
returns a "waiting page" which lets the user know that the PDF is being
generated and asks them to wait. When the PDF is ready, it is opened in
the browser.

This is done by adding the following javascript to the header of the
"waiting page" html file:

setTimeout('location.replace("/download/<!--$m.filestem$-->.pdf");',1000);

The server then waits until the specified PDF is ready, and when it
detects that the file is ready, returns the file to the browser.

So far so good. This works.

Where I have problems is when the user hits the "back" button from the
PDF, assuming that it opened in Acrobat Reader in their browser. With
Mozilla 1.1, IE 5.5, Safari, Mac IE, the back button takes the user back
to the request page, not the "waiting" page, which is what I want. But
with IE 6.0, the user is taken back to the "waiting" page, which then
takes them to the PDF, and they get stuck in a loop.

How can I make IE 6.0 do the equivalent of location.replace?

Thanks,
Christine
Jul 23 '05 #1
1 5544
Christine Forber wrote:

I have the following situation. On one page, a user clicks on a link
which triggers a server-side program to generate the requested output
PDF. Depending on the specifics of the PDF being generated, this process
may take some time. When the triggering process is complete, the server
returns a "waiting page" which lets the user know that the PDF is being
generated and asks them to wait. When the PDF is ready, it is opened in
the browser.

This is done by adding the following javascript to the header of the
"waiting page" html file:

setTimeout('location.replace("/download/<!--$m.filestem$-->.pdf");',1000);

The server then waits until the specified PDF is ready, and when it
detects that the file is ready, returns the file to the browser.

So far so good. This works.

Where I have problems is when the user hits the "back" button from the
PDF, assuming that it opened in Acrobat Reader in their browser. With
Mozilla 1.1, IE 5.5, Safari, Mac IE, the back button takes the user back
to the request page, not the "waiting" page, which is what I want. But
with IE 6.0, the user is taken back to the "waiting" page, which then
takes them to the PDF, and they get stuck in a loop.

How can I make IE 6.0 do the equivalent of location.replace?


Follow-up:

I have just tried modifying the javascript to:

(Note, forgot to explain above, the <!--$m.filestem$--> gets filled in
server-side by a proprietary ISAPI extension. In this example, I've
given the actual PDF file name just as was delivered to the browser.)
setTimeout('window.location.replace("/download/100687_7845609.pdf");',1000);

The file is loaded corrected, and the history is as expected in all
browsers that I've tested, but not IE 6.

I'd really appreciate some suggestions. I don't know of any other way to
get rid of this particular entry in the history in IE 6.

Thanks,
Christine
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Andoni | last post by:
Hi, I am only writing for IE 5.5+ so no need for compatibility at all ;-) I am trying to get my users to logoff which they finish on a particular page. This is no problem (or should be no...
2
by: James Marshall | last post by:
I'm trying to override location.replace() but I can't. I can override window.open(), document.write(), and other built-in methods, but not location.replace(). Here's a demo that overrides two...
5
by: spam_me_ not | last post by:
I already understand that one cannot disable a browser's forward and back functions. This is a situation where I have code working in Mozilla V1.6 and would like something similar for Opera and...
10
by: Roland | last post by:
Hello, the example code is the following(the number in parentheses at the beginning are just for reference)(The complete HTML file is at the end of this article): (1)window.location =...
1
by: solutions | last post by:
Hi, Here is my relevant code for an arbitrary page (let's call it PAGE_B): <body onload="window.location.hash='anchor';"> With this code, if the user goes from PAGE_A to PAGE_B, he will jump...
2
by: JHB | last post by:
Hi, How can I do a location.replace when I use a form, like when I use a href? This works. <a href="Ny HTML-side20.htm"; method="post" id="frm" name="BrugerHovedSide"...
3
by: Al | last post by:
Hi all... I have created an aspx page that contains an animated GIF. I am using javascript and location.replace to redirect from this page to another aspx page which takes several seconds to...
9
by: Jean Pierre Daviau | last post by:
Hi everybody, I have this function in a page (namely cours.html) function go(inValue) { var lien = 'file:///F:/MyWebs/jeanpierredaviaucom/httpdocs/cours1.html?T1=' + document.R.T1.value;
12
by: Jack | last post by:
Since, I have not got some desired advise, I am reposting this for some asnwer/valuable suggestion. Thanks. THE FOLLOWING IS A PART OF CODE FROM A ASP PAGE <% sql01 = "SELECT COUNT(*) AS...
5
by: Alan Little | last post by:
Do a search at this site: http://www.mindsift.com/ Select a non-sponsored link, then give the site a rating. The rating frame closes. Now click your "back" button. If you're using IE, you'll...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.