Monday, August 14, 2006

JavaScript | Redirect Parent Window

Have you ever faced a situation where you wanted to close a child window and redirect parent window to a new URL?

Well the solution to this problem is a simple javaScript. It goes something like this (I have executed the script on page load. It can be used with any event)

<body onload="opener.location='http://google.com';self.close();">

No comments:

Post a Comment