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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Selecting Default Button in "Confirm" Box!" Watch "Selecting Default Button in "Confirm" Box!" New topic
Author

Selecting Default Button in "Confirm" Box!

Mike Dingham
Greenhorn

Joined: Oct 06, 2006
Posts: 8
After opening "Confirm" box using a JavaScript method

return confirm('Blah Blah.');

It displays 'OK', 'Cancel' buttons. By default 'Ok' is selected and
upon clicking "Enter" button 'Ok' is fired.

Will it be possible to select 'Cancel' by default. So that when user
clicks 'Enter', 'Cancel' will be triggered?

Thanks,
Mike
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

Nope. Sorry.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Selecting Default Button in "Confirm" Box!
 
Similar Threads
OK button in a Form
confirm() and prompt() functions
Confirm box ok/cancel to Yes/No.
how to create type button in JSF using SUN RI
Can I change the buttons in a confirm alert box to 'Yes' , 'No'?