mobilekid Posted February 1, 2009 Share Posted February 1, 2009 how do I open 2 websites with same click on link? html/php only Quote Link to comment 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. Quote Link to comment 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? Quote Link to comment 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> Quote Link to comment 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'); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.