#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    51
    Rep Power
    12

    javascript: location.href problem


    I have a popup window and I want to *generically* tell the opener (i.e. window that opened the popup) to refresh itself when I close the popup.

    Right now I have in the popup's body tag:

    onUnload="self.opener.location.href='***'"

    What needs to go in place of ***?

    I tried parent.location.href alone and it takes it as a relevant link from the current directory that the page is in.

    I then tried javascript: parent.location.href and it got the right href but sent me to a page with just parent.location.href printed out. Any ideas? I think it's fairly simple but it's something small I'm missing.

    I appreciate any and all help =)

    ~panhead490
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2003
    Posts
    804
    Rep Power
    101
    Try:
    Code:
    window.opener.location.replace(window.opener.location);
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    51
    Rep Power
    12
    thanks so much! it worked like a charm...i respect people who know js. it is a pain and i've avoided learning it *thoroughly* for too long. i'd rather have my php, flash, java, or c++ any day.

    cheers,
    panhead490

IMN logo majestic logo threadwatch logo seochat tools logo