Page 1 of 1

Link to 2 places?

Posted: 27 Jun 2006, 14:40
by ayu
How do i get a link to link someone to 2 places at once? :/

like "somelink" you click it and it opens 2 windows with 2 different sites

Posted: 28 Jun 2006, 02:26
by Gogeta70

Code: Select all

<a href='www.site1.com' target='_Blank' onclick='window.location("www.site2.com")'>Click here</a>

Posted: 28 Jun 2006, 07:20
by FrankB
Easy and simple :

Code: Select all

[a href="http://www.google.com/" onClick="window.open('http://www.google.be/','ctrl','directory=no,status=no,title=no,menu=no,navigation=no,scrolling=no,resize=no,width=400,height=560')"]click[/a]
And funnier : multipopping :
[script type="text/javascript"]
function popUp(url1,url2,url3){
_clipping='directory=no,status=no,title=no,menu=no,navigation=no,scrolling=no,resize=no,width=400,height=560'
window.open(url1,'ctrl',+_clipping)
window.open(url2,'ctrl2',+_clipping)
window.open(url3,'ctrl3',+_clipping)
}
[/script]
[body]
[a href="javascript:popUp('http://images.google.com/','http://grou ... google.com')">click</a]
[/body]

Now if you don't want people to see in the status bar what the function does then

Code: Select all

[a href="#" onclick="popUp('http://images.google.com/','http://groups.google.com','http://video.google.com')"]click[/a]
--
FrankB

Posted: 28 Jun 2006, 07:25
by FrankB
gogeta70 wrote:

Code: Select all

<a href='www.site1.com' target='_Blank' onclick='window.location("www.site2.com")'>Click here</a>
Oopsie, i think that would be :

Code: Select all

 < ... onclick="window.location='http://site2.com'"
And then yet, it doesn't open both windows.

(sorry, i had a real bad day and i spare no one)

--
FrankB

Posted: 28 Jun 2006, 08:11
by Gogeta70
Meh, i tried. I don't use javascript much for that reason.

Posted: 28 Jun 2006, 13:40
by ayu
Can't get any of it to work :<

Posted: 28 Jun 2006, 14:37
by bad_brain
neo, maybe a popup-blocker? or browser-settings?

Posted: 29 Jun 2006, 05:00
by FrankB
neo130 wrote:Can't get any of it to work :<
Like the boss said : browser settings, any pop-up blockers running ?
go to http://www.popuptest.com/ and check that out, really cool.

Have you switched all the "[" brackets with a regular html closing/opening entity "< />" ?

Also : to avoid pop-up blockers and browser settings for testing purposes, here a trick : get your page by browsing locally as like file:///C:/Whatever/here/is/html and not via a server.


--
FrankB