Javascript: change window opener location from popup
Hi
i am launching a popup windows from a main html windows . in the pop up windows i have a table with numbers , i will like when a number is double clicked to trigger the display of the page associated with that numbers on the main windows could someone give some help please yan Back to top |
|||||
That's pretty straighforward, the basic idea is simple, I'm not going to write your code for you, but this is roughly how it works:
Page 1 : js-o.htm :: Code :: <html>
<head> </head> <body> <a href="#" onclick="window.open('js-c.htm','kid','resizable=no,scrollbars=no,width=250,height=148,toolbar=no');">click</a> </body> </html> Page 2, the popup : js-c.htm :: Code :: <html>
<head> </head> <body> <a href="#" onclick="window.opener.location.href='js-o2.htm';">change parent</a> </body> </html> Page 3, the new parent page, js-o2.htm :: Code :: <html>
<head> </head> <body> new page </body> </html> Page 2 uses window.opener to write a new url to the location of the window opener. If you only wanted to change the content of the opener page, you'd use DHTML to change the content of an element of the page, pretty much the same syntax. There's a pretty good discussion on this here. Back to top |
|||||
|
|||||
All times are GMT - 8 Hours
|