An easy 'OK' or 'Cancel' response can be aquired using this dialogue box and used to confirm an action. If 'OK' is selected
then true is returned, else false is returned.
<script type="text/javascript">
function do_confirm()
{
var s = confirm("Are you sure?");
alert(s);
}
</script>
<a onclick="do_confirm()" href='#'>Push Me</a><br>
Promt Dialogue
There is a prompt dialogue which can be used to ask for user input. The first parameter is the displayed text, whilst
the second parameter is the default answer, leave this empty if there is no default answer.
<script type="text/javascript">
function do_prompt()
{
var s = prompt("Is this your name?", "Gilburt");
alert(s);
}
</script>
<a onclick="do_prompt()" href='#'>Push Me</a><br>