Pop up html or Javascript that if OK is clicked it goes to one page but if no is clicked, goes to different page??

Disclaimer for a website im making.

lemonie7 years ago
Insert this script into the <HEAD>:

<script type="text/javascript">
function show_confirm()
{
var r=confirm("Click to continue");
if (r==true)
  {
  window.location="http://www.";
  }
else
  {
  window.location="http://www.";
  }
}
</script>

Insert this into the <BODY>

<input type="button" onclick="show_confirm()" value="Popup box" />

Values in bold you would change as you like/need

L


smitec087 years ago
<script type="text/javascript">
<!--

var answer = confirm("SOME MESSAGE HERE")
if (answer)
window.location="URL OF SITE 1"
else
window.location="URL OF SITE 2"

// -->
</script>