hi
Can anyone tell me why the below code is only alerting “HELLO”. It is not redirecting me to google.com
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form action="" method="get">
<a href="#" onclick="alert('Hello');window.location.href='http://www.google.com';"><input type="image" name="but" src="htc_m8_slide.jpg" /></a>
</form>
</body>
</html>
I even tried the below diferent code. But this also doesnt redirect me to google.com
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form action="" method="get">
<a href="http://www.google.com" target="_blank"><input type="image" name="but" src="htc_m8_slide.jpg" /></a>
</form>
</body>
</html>
Vineet