Skip to main content
Participant
May 17, 2007
Question

Tarketing Frame in New Window

  • May 17, 2007
  • 1 reply
  • 293 views
Hi
I have a number of links on a webpage. When you click on these I want them to open in a new window that has two frames. The top frame will be an advert back to my website and the bottom frame is where the link will open. Is this possible? How do I get a link to open in a new window and target a particular frame all in one go?
I can do it the long way by setting up a new page for every single advert, but is there a way to set up one page and get the the link to open a particular frame?

Thanks in advance
Eoghan
This topic has been closed for replies.

1 reply

Günter_Schenk
Inspiring
May 17, 2007
Don´t think that this can be done with regular HTML means, because the frameset displayed in the new window will have two hard-coded "targets" -- *maybe* this might work if...

1. you´re loading a "dynamic" page (e.g. "new_window.php" containing the frameset) in the new window, and in here...

2. make the bottom frame´s "src" accept a $_GET['page_url'] variable that´s passed via a parameter in the link -- example : <a target="_blank" href="new_window.php?bottomlink_target=page1.php">link</a>

the respective "frame name" in the new window should be able to receive the value of the above-mentioned "bottomlink_target" parameter this way:

<frame name="bottom" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" scrolling="auto" src="<?php echo $_GET['bottomlink_target']; ?>">

I think this should work, but never tried it myself -- so if you´re feeling adventurous, please see how it works and let us know ;-)
EoinBAuthor
Participant
May 19, 2007
Thank you I'll give that a try.