Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

A little JavaScript Windows help please...

  • 05-04-2002 12:56pm
    #1
    Moderators, Social & Fun Moderators Posts: 28,633 Mod ✭✭✭✭


    My parent windows fires off a popup child - no worries.
    The parent window then does a reload - again, no worries.
    Now I'm looking to close the popup after the parent finishes reloading.
    I'm guessing something along the lines of window.childname.close() but is it
    best to do a function that, when the parent loads, it checks if there's any
    windows open with that name (it'll always be the same name) and close them
    or is there a more precise way of doing it?


Comments

  • Moderators, Social & Fun Moderators Posts: 28,633 Mod ✭✭✭✭Shiminay


    Got it! I have a function that fires when the page loads which looks for any windows with the name of my popup and closes them:
    function killWin(){
      window.open("",winName); // no url, but you're supplying the name
      window.close();
      }
    
    It's seems so bloody simple now! :)


Advertisement