aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes Confirm Button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Confirm Button" Watch "Confirm Button" New topic

Confirm Button

sachin shinde

Joined: Jul 05, 2001
Posts: 27
Hi friends!
I want to know for confirm message Box what actually it returns when we pressed "ok" and "cancle"
How to check it?
Pl reply
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
I tried to explain it here,
function confirm_alert()
input_box=confirm("Click OK or Cancel to Continue");
if (input_box==true)
// Output/Function when OK is clicked
alert ("You clicked OK");
// Output/Function when Cancel is clicked
alert ("You clicked cancel");
It is sorta covered in the JavaRanch Style Guide.
subject: Confirm Button