Forums
This topic is locked
Change main window from a pop up window
Posted 18 Dec 2003 00:21:01
1
has voted
18 Dec 2003 00:21:01 Layne Benson posted:
Hello,I'm having a bit of trouble trying to figure out how to get this to work.
I have a window (window #1) which brings up a pop up window (window #2) on load. Now, I need a link in the pop up window to do two things. First i want it to load a url in the origional window (window #1) and also close the pop up (window #2)
I know something similar can be done with frames, but i don't have any experience doing this across seperate windows without frames. Does anyone have a solution or is able to point me in the right direction to solve this?
Any help is appreciated, thanks <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Replies
Replied 18 Dec 2003 08:07:38
18 Dec 2003 08:07:38 Dave Clarke replied:
To close the window you could use a javascript function
<script language="JavaScript">
function close_window() {
window.close();
}
</script>
and call this function from your link
<a href="javascript:;" onClick="close_window()">close window</a>
hang on a min tho, i've just found this script which does exactly what you want
www.moock.org/webdesign/javascript/popupwindows/loadurlinparent.html
Dave
ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome
<script language="JavaScript">
function close_window() {
window.close();
}
</script>
and call this function from your link
<a href="javascript:;" onClick="close_window()">close window</a>
hang on a min tho, i've just found this script which does exactly what you want
www.moock.org/webdesign/javascript/popupwindows/loadurlinparent.html
Dave
ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome
Replied 18 Dec 2003 15:54:19
18 Dec 2003 15:54:19 Layne Benson replied:
Thanks Dave! I'll get started and see if that works for me <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>