Calling a javascript function in a "a href=" statement
Heya, Im a Javascript n00b, just curious as to why this script doesn't work :confused:, i know it's basic...
This is the function in the head section of a HTML file...
VB Code:
<script language="JavaScript">
<!--
Function callpic(picname)
{ var h = 480;
var w = 640;
var l = (screen.width - w) / 2;
var t = (screen.height - h) / 2;
var fullpicname="http://users.bigpond.net.au/maniac/images/"+picname;
window.open('fullpicname', 'blank', 'width='+w+', height='+h+', top='+t+', left='+l);
}
//-->
</script>
And this is a link which I want to call the function :)...
VB Code:
<a href="http://***.***.net.au/***.htm" onClick="callpic('game-nfs1.jpg');">Image 1</a>
any thoughts, opinions or ***'s appreciated :)