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 3 of 3
  1. #1
    New Coder
    Join Date
    Sep 2005
    Location
    Latina (Italy)
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Changing the parent page URL

    Hi all!
    I'm trying to build a function that makes a new window call back its parent and make it reload its content, passing the reference it wants to redirect to.
    This is my code but it doesn't seem to work.
    Why?

    Code:
    function parentLoad( href )
    {	var parentWin = window.parent;
    	parentWin.location.href = href;
    	parentWin.location.reload(true);
    	self.blur();
    	parentWin.focus();
    }
    Thanx a lot!!

  • #2
    Regular Coder
    Join Date
    Aug 2005
    Location
    Toronto, ON, Canada
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts
    try
    window.location.replace(newUrl);
    rm -f /

  • #3
    Regular Coder martin_narg's Avatar
    Join Date
    Jul 2002
    Location
    Chamonix, France
    Posts
    600
    Thanks
    1
    Thanked 3 Times in 3 Posts
    "Cos it's strange isn't it. You stand in the middle of a library and go 'Aaaaaaaaaaaaaaaaggggggghhhhhhh!'
    and everybody just stares at you. But you do the same in an aeroplane, and everybody joins in."
    -Tommy Cooper


  •  

    Posting Permissions

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