P
pradeep
Hi
I want output that
There is a link, after clicking on it there is confirm box.
if i click on Ok then it display google.co.in
if i click on Cancel then it display yahoo.co.in
I try my best , but it can't display yahoo.co.in
please guide me.
Thanks in advance.
Code is :
<html>
<head>
<script type="text/javascript">
function confirmation() {
var answer = confirm("Do you want to output ?")
if (answer){
alert("Click on confirm box : Yes")
return true;
}
else{
alert("Click on confirm box : No")
window.location = "http://www.yahoo.com/";
return false;
}
}
</script>
</head>
<body>
<form>
<a href='http://www.google.co.in' onclick="confirmation();">Click me</
a>
</form>
</body>
</html>
I want output that
There is a link, after clicking on it there is confirm box.
if i click on Ok then it display google.co.in
if i click on Cancel then it display yahoo.co.in
I try my best , but it can't display yahoo.co.in
please guide me.
Thanks in advance.
Code is :
<html>
<head>
<script type="text/javascript">
function confirmation() {
var answer = confirm("Do you want to output ?")
if (answer){
alert("Click on confirm box : Yes")
return true;
}
else{
alert("Click on confirm box : No")
window.location = "http://www.yahoo.com/";
return false;
}
}
</script>
</head>
<body>
<form>
<a href='http://www.google.co.in' onclick="confirmation();">Click me</
a>
</form>
</body>
</html>