Open Two Links with one click

Status
Not open for further replies.

csflmuc

Pounding Googlebot
Oct 6, 2006
174
1
0
Europe
Would it be possible to open two different links with one click in php?

Basically, if the users clicks on my affiliate link, I would like to open up two different offers in a new windows.

Any input?
 


PHP normally wouldn't be doing it, but rather HTML/Javascript.

You could do this one of two ways.

Code:
<script type="text/javascript">
<!-- 
function popoffers()
{
window.open ("http://www.offerone.com","offerone");
window.open ("http://www.offertwo.com","offertwo");
// you could also use "_blank" for any new tab/window, or "_self" to replace the current page, though better using window.location if you're changing the current page.
}
//-->
</script>
-- above </head> --
<a href="#" onclick="popoffers(); return false;">Text</a>

The other method is doing a frame set between the two offers which you can probably use php for when the user clicks to goto the php page (with maybe an id attached for the offers). But the javascript method above sounds like what you'd want.
 
Status
Not open for further replies.