Click to See Complete Forum and Search --> : "ok" and "cancel " buttons


Pam
10-24-2003, 08:04 PM
how can i put the "ok" and "cancel " buttons on an alert message?

Please Help Me!!!

Khalid Ali
10-24-2003, 08:09 PM
prompt('text to be displayed','');

Jona
10-24-2003, 08:55 PM
Originally posted by Khalid Ali
prompt('text to be displayed','');

There is also the confirm() method:


<script type="text/javascript"><!--
if(confirm("Here is my question")){
&nbsp;alert("My question is OK!");
} else {
&nbsp;alert("You cancelled my question!");
}
//--></script>

[J]ona

Khalid Ali
10-24-2003, 10:18 PM
Jona is correct, there are 2 options for you to choose from..:D