Forum Moderators: phranque

Message Too Old, No Replies

Pop ups.

         

tonynoriega

8:21 pm on Oct 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have an image map that brings up a pop up window with a set size of 300x300

It has two links from there to continue navigation...

Problem i have encountered is that the page is only 300x300, and the links go to full 800x600 pages...this not very user friendly.

How can i expand that window when you click the link, or when you click the link go back to the main window...?

is either of these possible?

phranque

11:33 pm on Oct 17, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



you could do it in javascript, using something like this in an onClick attribute:
window.resizeTo(800,600)

or to refresh the parent and close the popup:
opener.location.reload(true);
self.close();

implementation details left to the reader...

tonynoriega

3:41 pm on Oct 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well your code works great.... and i re-read my post, and i wasnt exactly clear.... bonehead.

<a href="father_page.html" onclick="opener.location.reload(true); self.close();">Father Page Here</a>. </td>

This does close the child window and reloads the parent window.

But what i would like to do is once the user clicks this link, it loads that page....

I start with the Mother page, which pops up the child window of 300x300.

How do i make the father page show in replace of the mother window?

tonynoriega

3:46 pm on Oct 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



nevermind, figured it out:

onclick="opener.location=this.href; self.close();"