Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: More Popup's

  1. #1
    Regular Coder
    Join Date
    Oct 2002
    Posts
    144
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Angry More Popup's

    Hi Guys,

    I have a popup when the site is first loaded. In the popup there is a link to open another popup.

    My problem. From the second popup how do I close both popup's and at the same time load another page into the main window?

    Regards,

    The Dingbat

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Which window do you want to close the popups from?

  • #3
    Regular Coder
    Join Date
    Oct 2002
    Posts
    144
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Question More Popups

    Maybe I should have explained in a little more detail.

    The first page is contained in a frame with an auto popup when the site is first opened. The popup is set to open once only. In the first popup there is a link to open a second popup with some more info.

    My need is to close both popups and to load a form into the main frame window.

    All assistance is greatly appreciated.

    The Dingbat

  • #4
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    The scripts are slightly different depending on which popup you are going to include the link in to close the popups and load into your mainframe.


    Close both popups and load into mainframe from first popup.

    In the first popup
    [SIZE=1]
    <script>
    function close_me(){
    opener.parent.main.location="page4.htm"
    opener.close()
    self.close()
    popup2.close()
    }
    </script>


    <a href="#null" onclick="win2=window.open('popup2.htm','win','height=300,width=300,top=100,left=400')">Open Popup2</a>

    <a href="#null" onclick="close_me()">Close All</a>

    [/SIZE=1]
    Close both popups and load into mainframe from second popup.

    In the second popup.

    <script>
    function close_me(){
    opener.opener.parent.main.location="page4.htm"
    opener.close()
    self.close()
    }
    </script>

    <a href="#null" onclick="close_me()">Close All</a>







  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •