GeeCON Prague 2014*
The moose likes HTML, CSS and JavaScript and the fly likes Confirm message box only with Ok 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 message box only with Ok button." Watch "Confirm message box only with Ok button." New topic
Author

Confirm message box only with Ok button.

Shwetha Jagadish
Greenhorn

Joined: Mar 28, 2011
Posts: 11
Hi,

I want to have a Confirm Message box only with 'Ok' but without Cancel button. The purpose of this is i want to have a popup box with one button with the return value of true.
Alert box has one button but it wont return any value. So i want to have a popup box with a return Boolean value.

Please suggest how to do this.

Thanks,
Shwetha.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

Can't be done with the built-in confirm(). You'll need to build your own.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Shwetha Jagadish wrote:Hi,

Alert box has one button but it wont return any value. So i want to have a popup box with a return Boolean value.


If it is only going to be true, why do you need it to return true? Seems like overthinking.

Eric
 
GeeCON Prague 2014
 
subject: Confirm message box only with Ok button.