File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 15385
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
It's not a secret anymore!