Href link does not opens?

Nov 21 2011 7:00 AM
Hi!

When mouse pointer goes on the the line 'Click me to go on website' it should give a pop window 'In alert section' which comes then ok button is clicked, and the line 'Click me to go on website' it rather going on www.google.com.pk it gives
C:/Documents and Settings/arbab.ahmed/Desktop/www.google.com.pk.


<html>
<head>
<title>handling onMouseOut for links </title>
<script language="JavaScript">

function advertiseLink()
{
alert (" In alert Section")
if (Confirm(" in if confirm"))
{
window.location="http://www.google.com.pk"
}
}
</script>
</head>
<body>
<h1>handling onMouseOut for links</h1>
<p><a onmouseout="advertiseLink()" HREF='www.google.com.pk'> Click me to go on website </a></p>
</body>
</html>

what's wrong with this program?

Thanks in advance.

Answers (3)