Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #13249
| Newsgroups | comp.lang.javascript |
|---|---|
| Subject | Re: Preventing "Prevent this page from creating additional dialogs" |
| From | "Evertjan." <exjxw.hannivoort@interxnl.net> |
| References | (4 earlier) <XnsA02A88568F72Eeejj99@194.109.133.133> <xcijeeTNtKfPFw4E@invalid.uk.co.demon.merlyn.invalid> <dr6qn7pl2u3c3e7kiv0m3g9f0rqka087ql@4ax.com> <XnsA02C67D818E24eejj99@194.109.133.133> <75frn792kreqn0t372imt8u8pj3i60i5rl@4ax.com> |
| Message-ID | <XnsA02D64BA8AFeejj99@194.109.133.133> (permalink) |
| Date | 2012-04-05 22:37 +0000 |
Gene Wirchenko wrote on 05 apr 2012 in comp.lang.javascript:
> On 05 Apr 2012 08:12:32 GMT, "Evertjan."
> <exjxw.hannivoort@interxnl.net> wrote:
>
>>Jeff North wrote on 05 apr 2012 in comp.lang.javascript:
>>> Methinks that Dr Stockton has totally missed the point about alert
>>> and confirm dialog boxes.
>>
>>I don't think so, Jeff.
>>Dialog boxes have no 'the point'.
>>The tread or you might have,
>>on Usenet we are free to change or ignore that.
>>
>>====================
>>
>>What is needed is to convince the powers-that-be in the browser world
>>what we realy need.
>
> Quite.
>
>>How to better show that than writing a sort-of functionality that
>>implements what should be done on a more system-wide scale,
>>as John did here.
>>
>>My suggestion is not to add a function ask(), but to add
>>functionality:
>
> We diagree here, but that is only a name.
>
>>alert(), confirm() and prompt() should, next to their present behavour
>>as a future default, have the possibility to be more versatile:
>>
>>[Yes Thomas, window.alert(), etc.]
>>
>>alert('What?'); // default
>>alert('What?','lan:nl-nl'); // default with forced language
>>alert('What?','Go on');
>>[should aalways return true]
>
> Why bother having a return value? alert() does not have one now.
But it does, it defaults to not false, try it out.
There are no internal or defined functions without an implicit return
value in javascript.
Think it over, why should this crash?
if (alert(1)) ...
>>var r = confirm('Are you quite certain?') // default;
>>var r = confirm('Are you sure?','lan:default'); // default forced lang
>>var r = confirm('Are you sure?','I am','No, I'm not');
>>[these return true/false]
>>
>>var r = confirm('Are you sure?','I am','No, I'm not','Please
>>explain'); var r = confirm('How much is 2+2?','7','4.2','2','Help
>>me!'); [these return the string clicked,
>>any number of choices>2, displayed vertically]
>
> I think that confirm() should be yes/no only. "confirm" means to
> get OK or not and does not fit multiple choice. For multiple choice,
> use something else. choose()?
The powars are very conversative, If you let tham argue about a new name
you loose valuable years.
>>var r = prompt('How much is 2+2?'); // default
>>var r = prompt('How much is 2+2?',lan:en-gb');
>>var r = prompt('How much is 2+2?','Done','Don`t know');
>>[these return the (perhaps empty) string entered or false]
>
> false for cancelling the prompt with close? What about null?
Not backwards compatible.
What do you mean by 'close'?
>>The arguments should be return any computed value.
>
> This does not parse. Do you mean that any value should be
> returnable? I would stick with character. Process the value if you
> need a different type.
Sorry, "caracter", do you mean "string"?
>>alert(array),confirm(array),prompt(array),
>>should be possible in all above cases.
>
> Good idea.
>
> There is one other thing. I want to be able to specify the
> default button.
One can never specify the default.
"Default" means "when not specified".
> There is quite a difference between
> Do you really want to print that report?
> and
> Do you really want to erase the entire database?
> It might be fine to default the first one to yes, but it would be
> horrible to do so for the second.
Sorry, that is up to the script programmer,
has nothing to do with my suggested improvements
> Yes, one can reverse the language, but then it often loses the
"reverse the language" like Hebrew, written in a "reversed" direction?
Perhaps you mean "reverse the question"
in the sense of affirmative/negative?
> clarity
> Do you mind erasing the entire database?
> "Erasing the entire database? ... No! ... ... Oh, NO!"
Perhaps "mind" as in "mind the child"?
A good system has ample backups.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Preventing "Prevent this page from creating additional dialogs" "Larry.Martell@gmail.com" <larry.martell@gmail.com> - 2012-03-23 17:12 -0700
Re: Preventing "Prevent this page from creating additional dialogs" Scott Johnson <noonehome@chalupasworld.com> - 2012-03-24 06:55 -0700
Re: Preventing "Prevent this page from creating additional dialogs" "Larry.Martell@gmail.com" <larry.martell@gmail.com> - 2012-03-24 07:58 -0700
Re: Preventing "Prevent this page from creating additional dialogs" Denis McMahon <denismfmcmahon@gmail.com> - 2012-03-24 18:41 +0000
Re: Preventing "Prevent this page from creating additional dialogs" Scott Johnson <noonehome@chalupasworld.com> - 2012-03-24 20:59 -0700
Re: Preventing "Prevent this page from creating additional dialogs" "Larry.Martell@gmail.com" <larry.martell@gmail.com> - 2012-03-25 12:26 -0700
Re: Preventing "Prevent this page from creating additional dialogs" Scott Johnson <noonehome@chalupasworld.com> - 2012-03-25 16:55 -0700
Re: Preventing "Prevent this page from creating additional dialogs" "Tom de Neef" <tdeneef@qolor.nl> - 2012-03-24 17:06 +0100
Re: Preventing "Prevent this page from creating additional dialogs" Rick Viscomi <rviscomi@gmail.com> - 2012-03-24 11:24 -0700
Re: Preventing "Prevent this page from creating additional dialogs" Scott Johnson <noonehome@chalupasworld.com> - 2012-03-24 21:01 -0700
Re: Preventing "Prevent this page from creating additional dialogs" David Mark <dmark.cinsoft@gmail.com> - 2012-03-28 20:16 -0700
Re: Preventing "Prevent this page from creating additional dialogs" Matt McDonald <matt@fortybelow.ca> - 2012-04-03 08:35 -0600
Re: Preventing "Prevent this page from creating additional dialogs" theAbacus@yahoo.com - 2012-04-02 16:16 -0700
Re: Preventing "Prevent this page from creating additional dialogs" Gene Wirchenko <genew@ocis.net> - 2012-04-02 21:11 -0700
Re: Preventing "Prevent this page from creating additional dialogs" "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-04-03 07:01 +0000
Re: Preventing "Prevent this page from creating additional dialogs" Gene Wirchenko <genew@ocis.net> - 2012-04-03 08:28 -0700
Re: Preventing "Prevent this page from creating additional dialogs" Jeff North <jnorthau@yahoo.com.au> - 2012-04-03 17:20 +1000
Re: Preventing "Prevent this page from creating additional dialogs" David Mark <dmark.cinsoft@gmail.com> - 2012-04-03 00:28 -0700
Re: Preventing "Prevent this page from creating additional dialogs" "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-04-03 11:24 +0000
Re: Preventing "Prevent this page from creating additional dialogs" Dr J R Stockton <reply1214@merlyn.demon.co.uk.not.invalid> - 2012-04-04 21:13 +0100
Re: Preventing "Prevent this page from creating additional dialogs" Jeff North <jnorthau@yahoo.com.au> - 2012-04-05 14:12 +1000
Re: Preventing "Prevent this page from creating additional dialogs" "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-04-05 08:12 +0000
Re: Preventing "Prevent this page from creating additional dialogs" Gene Wirchenko <genew@ocis.net> - 2012-04-05 08:51 -0700
Re: Preventing "Prevent this page from creating additional dialogs" "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-04-05 22:37 +0000
Re: Preventing "Prevent this page from creating additional dialogs" Gene Wirchenko <genew@ocis.net> - 2012-04-05 19:51 -0700
Re: Preventing "Prevent this page from creating additional dialogs" "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-04-06 07:22 +0000
Re: Preventing "Prevent this page from creating additional dialogs" Gene Wirchenko <genew@ocis.net> - 2012-04-06 09:14 -0700
Re: Preventing "Prevent this page from creating additional dialogs" "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-04-06 19:54 +0000
Re: Preventing "Prevent this page from creating additional dialogs" Gene Wirchenko <genew@ocis.net> - 2012-04-06 13:09 -0700
Re: Preventing "Prevent this page from creating additional dialogs" "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-04-06 20:23 +0000
Re: Preventing "Prevent this page from creating additional dialogs" Gene Wirchenko <genew@ocis.net> - 2012-04-06 19:48 -0700
Re: Preventing "Prevent this page from creating additional dialogs" Dr J R Stockton <reply1214@merlyn.demon.co.uk.not.invalid> - 2012-04-07 19:14 +0100
Re: Preventing "Prevent this page from creating additional dialogs" Dr J R Stockton <reply1214@merlyn.demon.co.uk.not.invalid> - 2012-04-07 19:04 +0100
Re: Preventing "Prevent this page from creating additional dialogs" Dr J R Stockton <reply1214@merlyn.demon.co.uk.not.invalid> - 2012-04-06 21:20 +0100
Re: Preventing "Prevent this page from creating additional dialogs" Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2012-04-07 02:49 +0200
Re: Preventing "Prevent this page from creating additional dialogs" Gene Wirchenko <genew@ocis.net> - 2012-04-06 19:49 -0700
Re: Preventing "Prevent this page from creating additional dialogs" Mike Duffy <Use_guestbook_page@website.in.sig> - 2012-04-07 03:02 +0000
Re: Preventing "Prevent this page from creating additional dialogs" Gene Wirchenko <genew@ocis.net> - 2012-04-06 20:38 -0700
Re: Preventing "Prevent this page from creating additional dialogs" Mike Duffy <Use_guestbook_page@website.in.sig> - 2012-04-07 04:09 +0000
Re: Preventing "Prevent this page from creating additional dialogs" Dr J R Stockton <reply1214@merlyn.demon.co.uk.not.invalid> - 2012-04-08 19:34 +0100
Re: Preventing "Prevent this page from creating additional dialogs" Mike Duffy <Use_guestbook_page@website.in.sig> - 2012-04-09 14:56 +0000
Re: Preventing "Prevent this page from creating additional dialogs" John G Harris <john@nospam.demon.co.uk> - 2012-04-07 11:38 +0100
Re: Preventing "Prevent this page from creating additional dialogs" Gene Wirchenko <genew@ocis.net> - 2012-04-03 08:37 -0700
Re: Preventing "Prevent this page from creating additional dialogs" Jeff North <jnorthau@yahoo.com.au> - 2012-04-03 22:06 +1000
csiph-web