Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Confirm message box only with Ok button.

 
Shwetha Jagadish
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can't be done with the built-in confirm(). You'll need to build your own.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic