PDA

View Full Version : Call window.open()...



Grand Mamamouch
26th November 2004, 05:51 AM
Hi !

Could you tell me why the onclick way works and not the direct way ?

Thanx.

<script type="text/Javascript">
window.open('http://www.epita.fr')
</script>

<a
onclick=window.open('http://www.epita.fr')
>
ryrtutsdfur
</a>

adam
26th November 2004, 07:28 AM
Try maybe
<body onLoad="window.open('blabla');">

http://www.gatescript.com/events.html

gablaxian
26th November 2004, 10:27 AM
if i were you, i'd stick with the clicking method anyway. Otherwise it will probably get blocked by pop up blockers.

crackers
26th November 2004, 06:25 PM
The <a> tag is malformed in a couple of ways. It should look something like this:


<a href="" onClick="javascript:window.open('http://www.epita.fr');"></a>