SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jun 2000
    0 Post(s)
    0 Thread(s)

    Post reload website from a window

    Hi, I hope anybody can help me. So here is my problem:

    I have a normal website. From this website I have opend a window with this code :

    javascript openwin('mylinks.htm','mylinks','toolbar=no,scrollbars=yes,resizable=no,width=650,height=500')

    Now i want that, when the window is closed, the normal website is reloaded. Therefore i have insert this code in der window :

    <BODY onUnload="window.reload()">

    But somehow i need a name for the normal website, so that the computer knows which window he should reload.

    As somebody on a other board told me i had to name the
    normal window fist with a code like: = "main";

    Where do I have to insert this code ( = "main"; ) in the website?

    And how do I insert the name of the website in the code of the window?
    <BODY onUnload="window.reload()">

    Thanks for your help.

  2. #2
    SitePoint Addict
    Join Date
    Mar 2001
    the windy city
    0 Post(s)
    0 Thread(s)
    when you open a pup-up window with javascript, you can reference the "main" window as "opener"
    so, try this in your pop-up:
    <BODY onUnload="opener.document.location=opener.document.location">
    somehow I had troubles applying the "reload()" to teh opener, but have successfully done it with teh document.location trick
    Goals are dreams with deadlines
    Nimlok Trade Show Displays Booths and Exhibits


Posting Permissions

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