location.replace

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Christine Forber

    #1

    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('loc ation.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.replac e?

    Thanks,
    Christine
  • Christine Forber

    #2
    Re: location.replac e

    Christine Forber wrote:[color=blue]
    >
    > 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('loc ation.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.replac e?[/color]

    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('win dow.location.re place("/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

    Comment

    Working...