<script> function ifshow() { showmsg=confirm("you have just received a new message. do you want to see it?"); if (showmsg==true) window.open("msg.htm","newwindow",""); else alert("ok, you don't want to see it!"); } </script> <body> <input type=button value=show onclick=ifshow()>
function ifshow()
{
showmsg=confirm("you have just received a new message. do you want to see it?");
if (showmsg==true)
window.open("msg.htm","newwindow","");
else
alert("ok, you don't want to see it!");
}
</script>
<body>
<input type=button value=show onclick=ifshow()>