SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Jun 2000
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    refreshing main page from popup with javascript

    Hello,

    I wonder if you can help please?

    I have a normal web page that contains a link.

    When the link is pressed a javascript popup window occurs asking the user for a choice.

    The popup window then closes and I want also for the original page to be refreshed.

    So how do I do the refreshing is my question.

    I realise the reload command is relevant, but am unsure on how to tell the pop up window to refresh the original page.

    Thanks if you can help,

    Regards,

    Jason

  2. #2
    ********* obeah makeda's Avatar
    Join Date
    Jun 2001
    Location
    rollin' on dubs
    Posts
    492
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    put something like this in your popup window. you will have to check what selection the user makes but the lines you need are below:

    <script language="JavaScript" type="text/javascript">
    <!--
    function checkIt() {
    if (myForm.radioButton.value == 'yes')
    opener.location.reload(true);
    self.close();
    }
    else {
    alert("You must choose yes to continue.");
    }

    }
    // -->
    </script>


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
  •