Close and refresh with bookmark?

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

    #1

    Close and refresh with bookmark?

    After I submit a form from a popup window, I use the following code to close
    the popup and refresh the parent window.

    <a href="#" onclick="window .opener.locatio n.reload();self .close();return
    false;">

    The link to the popup window is at the bottom of the parent page (long) and
    I jump to it with a bookmark. Currently, after the refresh occurs, the
    parent page ends up back at the top. Is there a way to adjust the above code
    (or use a different method) to go back to the bookmark when the parent is
    refreshed?

    Thanks in advance!!!



  • Vincent van Beveren

    #2
    Re: Close and refresh with bookmark?

    Hi Targa,
    [color=blue]
    > The link to the popup window is at the bottom of the parent page
    > (long) and I jump to it with a bookmark. Currently, after the refresh
    > occurs, the parent page ends up back at the top. Is there a way to
    > adjust the above code (or use a different method) to go back to the
    > bookmark when the parent is refreshed?[/color]

    I assume with bookmark you mean the history of that browser window. No
    there is no good way of doing that, because calling a history.back()
    after the location.reload () has happend won't work. However, what you
    might be able to do is not reload the page, but request the URL again,
    but use a # to jump to the link.

    window.opener.l ocation.href='m ypage.html#popu p';

    All you need to do is give the a name to your link on the bottom:

    <A HREF="#" NAME="popup" ...>Blah</A>

    And when the parent is reloaded it should jump to the original link
    for the popup window.

    Good luck,
    Vincent

    Comment

    Working...