mobilekid Posted February 1, 2009 Share Posted February 1, 2009 how do I open 2 websites with same click on link? html/php only Link to comment https://forums.phpfreaks.com/topic/143378-how-to-open-2-links-with-same-click/ Share on other sites More sharing options...
trq Posted February 1, 2009 Share Posted February 1, 2009 You would need to use Javascript. PHP executes on the server and has no concept of links or windows. Link to comment https://forums.phpfreaks.com/topic/143378-how-to-open-2-links-with-same-click/#findComment-752019 Share on other sites More sharing options...
mobilekid Posted February 1, 2009 Author Share Posted February 1, 2009 i see, how would i setup the code to execute 2 links? Link to comment https://forums.phpfreaks.com/topic/143378-how-to-open-2-links-with-same-click/#findComment-752036 Share on other sites More sharing options...
Vince889 Posted February 1, 2009 Share Posted February 1, 2009 Simple Javascript: <a href="http://www.sitehere.com" onclick="window.open('http://www.secondsitehere.com','newwin');">click me</a> Link to comment https://forums.phpfreaks.com/topic/143378-how-to-open-2-links-with-same-click/#findComment-752040 Share on other sites More sharing options...
MadTechie Posted February 1, 2009 Share Posted February 1, 2009 untested example <a onclick="javascript:OpenBoth('http://domain1.com','http://domain1.com');">click me</a> function OpenBoth(url1,url2) { myRef1 = window.open(url1,'mywin1', 'left=20,top=20,width=500,height=500'); myRef2 = window.open(url2,'mywin2', 'left=40,top=40,width=500,height=500'); } Link to comment https://forums.phpfreaks.com/topic/143378-how-to-open-2-links-with-same-click/#findComment-752042 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.