The buttons on a confirm box cannot be changed, nor can a default
button be specified.
Change the question to a statement so that "OK" is suitable as the
default response.
Example:
"Would you like us to charge your credit card?" (wrong)
"We will now charge your credit card." (right).
The complete comp.lang.javascript FAQ is at
http://jibbering.com/faq/
--
The sendings of these daily posts are proficiently hosted
by http://www.pair.com.
That is incorrect, because the default response should be to not charge
the card. A default response should always be a safe one, either
cancelling or not immediately proceeding with the transaction.
A default reply to a confirm box should only be used to confirm
something non-irrevocable.
Before it was changed, the example was satisfactory, because of the
element of farce in the question as asked.
A better question might be "do you want to go on to the next stage?"
which does not carry the suggestion of irrevocability.
IIRC, Delphi offers a much wider choice of buttons, selected by a set of
bits.
--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (RFCs 5536/7)
Do not Mail News to me. Before a reply, quote with ">" or "> " (RFCs 5536/7)
Bullshit. This would be in response to the user clicking a "Pay Now"
button (or the like).
> A default response should always be a safe one, either
> cancelling or not immediately proceeding with the transaction.
So, OK should cancel? What would cancel do? And it's just an
example. Perhaps we should remove credit cards from the equation so
as not to muddy the underlying issue (statements vs. questions).
>
> A default reply to a confirm box should only be used to confirm
> something non-irrevocable.
>
> Before it was changed, the example was satisfactory, because of the
> element of farce in the question as asked.
What? So put back the farce, but don't use a _question_ for OK/
Cancel. Just read the thing aloud and you will understand what I'm
getting at.
>
> A better question might be "do you want to go on to the next stage?"
Oh no you didn't. See above. :)
> which does not carry the suggestion of irrevocability.
"We will now proceed to the next stage." :)
>
> IIRC, Delphi offers a much wider choice of buttons, selected by a set of
> bits.
Of course. All desktop software can do that. Yes/No/Cancel, OK/
Cancel/Apply, etc. The point is that browsers (with the exception of
IE) cannot.