Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

parent and child pages in asp

  • 28-05-2003 10:59AM
    #1
    Closed Accounts Posts: 495 ✭✭


    I have the following link in a web page
    <a href="page on my server" target="_blank">

    this will open a child page, is it possible to reload the parent page when the child closes?

    any help much appreciated!


Comments

  • Closed Accounts Posts: 9,314 ✭✭✭Talliesin


    It isn't a child page, it's just another window with no relationship to the previous one. If you open the page using javascript then you can reference the opener window from the new window using more javascript, this in turn allows you to do a reload on the opener from the new window.

    Of course opening a new window in javascript is even worse than opening a new window normally, but then if you're already breaking one guidelines I suppose you might as well plow on through. (No, the irony of those links opening in new windows isn't lost on me).

    The actual code for doing so is something like:
    <body onunload="if (window.opener)window.opener.location.reload();">
    

    With the check on the existence of window.opener necessary to prevent problems with browsers that don't have that property in the window object or if the window got opened by some means other than javascript.

    This is a client-side thing, nothing to do with ASP, so I'll move this to webmaster where it's more their bag.


  • Closed Accounts Posts: 495 ✭✭Beëlzebooze


    So how is the relationship between the opener and the openee :-) realised?

    do I then just have to open a new window using javascript, or do I have to pass parameters to the new window?


Advertisement