SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru adammc's Avatar
    Join Date
    Aug 2004
    Location
    Cairns, Australia
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Open window & Refresh parent window?

    Hi Guys,

    I am a little stuck as to how to open a new window & refresh the parent window using javascript.

    1. User clicks link which opens a new window
    2. Upon clicking the link the parent window is refreshed.
    3. The user is able to click a link in the window that opened (close window)

    I have tried using this to refresh the window in the page that opens:
    Code:
    <a href=\"javascript:top.close();top.opener.location.reload();\" class=headings title='continue shopping'>Continue Shopping</A>
    And this to open the window:
    Code:
    target='new'>
    Apart from not refreshing as soon as the window is opened (obviously), I have received warnings from the browser saying that the webpage is tryign to close the window.

    Can anyone possibly help with this?

  2. #2
    SitePoint Guru adammc's Avatar
    Join Date
    Aug 2004
    Location
    Cairns, Australia
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just re-read my post, I dont think I explained my situation too well.


    I am basically after the javascript code that will allow me to open a new window (on page 1) using a link and at the same it opens a new window (page2) it refreshes page1.

    Then on page 2 I want a link to be able to close page2 so the user can return to page1.

    Can anyone possibly help?


Bookmarks

Posting Permissions

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