Click to See Complete Forum and Search --> : Is it possible to make an alert with "cancel" and "accept" buttons?


arturion
08-20-2003, 08:02 PM
I want to make an alert with "accept" and "cancel" buttons. If people push "accept" button, the browser makes an action (like go to another page), and if they push "cancel" button, do other action or do nothing. But in an alert!, not in the document neither popup, or layer.

Exuro
08-20-2003, 08:14 PM
I think what you're looking for is a confirm box:

<script type="text/javascript">
<!--
if (confirm("Would you like to?"))
{doSomething();}
else
{doSomethingElse();}
//-->
</script>

If that's not quite what you wanted, I'd look into msgbox with VbScript. Well, hope that helps!