Forum Moderators: open

Message Too Old, No Replies

Popup window, that uses the window that called it...

         

sirrion

12:23 am on Sep 5, 2003 (gmt 0)



ok guys heres what im looking to do, whether i NEED to use Javascript or not, id prefer not to, but will do if needed.

I would like to have "index.html" call "popup.html" and then the user would click a link in "popup.html" which uses index.html to load the link clicked, is that at all possible without javascript? either way, could you point me in the right direction...

the ONLY requirment that i need, is "popup.html" when called from "index.html" is 475 width, 200 height.

i hope someone can help me...

thanks guys/gals.

korkus2000

2:18 am on Sep 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld sirrion,

Yes this is possible with JavaScript. You will use the window.opener address like:

window.opener.location.href="pagename.htm";

This would need to be in the popup.htm page.

mattglet

5:47 pm on Sep 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



technically, that IS javascript... isn't it?

-Matt

korkus2000

5:51 pm on Sep 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't think you can address windows without client side script. Targets are really for frames, and are depricated with XHTML. Controlling window sizes and attributes is also a JavaScript only function.

BergtheRed

6:11 pm on Sep 6, 2003 (gmt 0)

10+ Year Member



to control your window:

myWindow=window.open('full.URL.to/popup.html','popup_name','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=475,height=200')

in your pop-up window, the code for the link would be:

<a href="the.URL.link" onclick="opener.location.href='location.to.goto'">