Message from discussion Preventing "Prevent this page from creating additional dialogs"
Received: by 10.68.202.168 with SMTP id kj8mr4495912pbc.1.1333665431889;
Thu, 05 Apr 2012 15:37:11 -0700 (PDT)
Subject: Re: Preventing "Prevent this page from creating additional dialogs"
From: "Evertjan." <exjxw.hannivo...@interxnl.net>
References: <10806346.32.1332613472484.JavaMail.geo-discussion-forums@vbht7> <30433830.1107.1333408583298.JavaMail.geo-discussion-forums@yneo2> <firstname.lastname@example.org> <email@example.com> <XnsA02A88568F72Eeejj99@184.108.40.206> <xcijeeTNtKfPFw4E@invalid.uk.co.demon.merlyn.invalid> <firstname.lastname@example.org> <XnsA02C67D818E24eejj99@220.127.116.11> <email@example.com>
Date: 05 Apr 2012 22:37:10 GMT
X-Trace: 1333665430 dreader35.news.xs4all.nl 26817 ehannivo/18.104.22.168:61284
> On 05 Apr 2012 08:12:32 GMT, "Evertjan."
> <exjxw.hannivo...@interxnl.net> wrote:
>>> 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.
>>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
> 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
>>[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
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"?
>>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?
> 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?
> 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.
(Please change the x'es to dots in my emailaddress)