Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #13024 > unrolled thread
| Started by | "Larry.Martell@gmail.com" <larry.martell@gmail.com> |
|---|---|
| First post | 2012-03-23 17:12 -0700 |
| Last post | 2012-04-03 22:06 +1000 |
| Articles | 20 on this page of 44 — 15 participants |
Back to article view | Back to comp.lang.javascript
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
Page 2 of 3 — ← Prev page 1 [2] 3 Next page →
| From | Jeff North <jnorthau@yahoo.com.au> |
|---|---|
| Date | 2012-04-05 14:12 +1000 |
| Message-ID | <dr6qn7pl2u3c3e7kiv0m3g9f0rqka087ql@4ax.com> |
| In reply to | #13222 |
On Wed, 4 Apr 2012 21:13:01 +0100, in comp.lang.javascript Dr J R
Stockton <reply1214@merlyn.demon.co.uk.not.invalid>
<xcijeeTNtKfPFw4E@invalid.uk.co.demon.merlyn.invalid> wrote:
>| In comp.lang.javascript message <XnsA02A88568F72Eeejj99@194.109.133.133>
>| , Tue, 3 Apr 2012 11:24:10, Evertjan. <exjxw.hannivoort@interxnl.net>
>| posted:
>|
>| >David Mark wrote on 03 apr 2012 in comp.lang.javascript:
>| >
>| >> OK/Cancel is what browsers use, so
>| >> deal with it.
>| >
>| >Only with the OS set to English.
>|
>| <http://www.merlyn.demon.co.uk/quotings.htm#FredHoyle> : it's worked
>| with you.
>|
>|
>| What is needed is a General Asker.
>|
>| window.asker = function(A, B, C, D, E, F) { native code }
>|
>| A is an array of strings to show above, between, and under B & C.
>| B is an array of strings to label input type=text elements
>| C is an array of strings to preload input type=text elements
>| D is an array of button legends.
>| E is an array with E[0] being the number of the default button
>| F is a number indexing into standard icons such as Error, Warn; or a
>| reference to an image to be used; or empty.
>|
>| The return value is an array corresponding to C but as altered, and E[0]
>| is now the number of the button pressed (with the close box being -1).
>|
>| Or something equally general - one might use colours, too.
Methinks that Dr Stockton has totally missed the point about alert and
confirm dialog boxes.
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exjxw.hannivoort@interxnl.net> |
|---|---|
| Date | 2012-04-05 08:12 +0000 |
| Message-ID | <XnsA02C67D818E24eejj99@194.109.133.133> |
| In reply to | #13229 |
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.
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:
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]
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]
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]
The arguments should be return any computed value.
alert(array),confirm(array),prompt(array),
should be possible in all above cases.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2012-04-05 08:51 -0700 |
| Message-ID | <75frn792kreqn0t372imt8u8pj3i60i5rl@4ax.com> |
| In reply to | #13234 |
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.
>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()?
>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?
>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.
>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. 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.
Yes, one can reverse the language, but then it often loses the
clarity
Do you mind erasing the entire database?
"Erasing the entire database? ... No! ... ... Oh, NO!"
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exjxw.hannivoort@interxnl.net> |
|---|---|
| Date | 2012-04-05 22:37 +0000 |
| Message-ID | <XnsA02D64BA8AFeejj99@194.109.133.133> |
| In reply to | #13245 |
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)
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2012-04-05 19:51 -0700 |
| Message-ID | <pqlsn7p6g2mu48sho8255uc7mjjri4kri5@4ax.com> |
| In reply to | #13249 |
On 05 Apr 2012 22:37:10 GMT, "Evertjan."
<exjxw.hannivoort@interxnl.net> wrote:
>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:
[snip]
>> Why bother having a return value? alert() does not have one now.
>
>But it does, it defaults to not false, try it out.
I did with
alert(alert("Hi"));
I got an alert with "Hi" then one with "undefined". This was on IE 9.
All of my examples in this post were done under IE 9.
>There are no internal or defined functions without an implicit return
>value in javascript.
>
>Think it over, why should this crash?
>
>if (alert(1)) ...
It did not crash for me. I gave it an else clause, and that
clause was executed.
>>>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.
ITYM "powers", "conservative", and "lose", but certainly
"conversative" will do. They will talk it to death.
>>>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.
But prompt() did return null for me.
>What do you mean by 'close'?
Clicking on the close button. That returns null for me as does
clicking on cancel.
>>>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"?
Yes. Character data in the form of a 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.
Yes, I can with message boxes for one.
>"Default" means "when not specified".
When not specified by the user, my specified choice will be made.
>> 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
It is a case of user-friendliness.
>> 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?
As in reversing the question.
>> clarity
>> Do you mind erasing the entire database?
>> "Erasing the entire database? ... No! ... ... Oh, NO!"
>
>Perhaps "mind" as in "mind the child"?
No, as in "Do you if I smoke?"
>A good system has ample backups.
An even better system does not need them restored very often.
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exjxw.hannivoort@interxnl.net> |
|---|---|
| Date | 2012-04-06 07:22 +0000 |
| Message-ID | <XnsA02D5F5042843eejj99@194.109.133.133> |
| In reply to | #13254 |
Gene Wirchenko wrote on 06 apr 2012 in comp.lang.javascript:
>>But it does, it defaults to not false, try it out.
>
> I did with
> alert(alert("Hi"));
> I got an alert with "Hi" then one with "undefined". This was on IE 9.
> All of my examples in this post were done under IE 9.
Never touch the stuff.
>>There are no internal or defined functions without an implicit return
>>value in javascript.
>>
>>Think it over, why should this crash?
>>
>>if (alert(1)) ...
>
> It did not crash for me. I gave it an else clause, and that
> clause was executed.
So it was interpreted as not being false, so true.
If no return was given, the code woud crash/halt.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2012-04-06 09:14 -0700 |
| Message-ID | <2g5un7ldjsbu85uf422nsafq0htfic34bh@4ax.com> |
| In reply to | #13256 |
On 06 Apr 2012 07:22:13 GMT, "Evertjan."
<exjxw.hannivoort@interxnl.net> wrote:
>Gene Wirchenko wrote on 06 apr 2012 in comp.lang.javascript:
>>Evertjan wrote:
>>>Think it over, why should this crash?
>>>
>>>if (alert(1)) ...
>>
>> It did not crash for me. I gave it an else clause, and that
>> clause was executed.
>
>So it was interpreted as not being false, so true.
Uh, no. On my system, the else clause is executed when the
expression is not true.
>If no return was given, the code woud crash/halt.
It returned undefined.
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exjxw.hannivoort@interxnl.net> |
|---|---|
| Date | 2012-04-06 19:54 +0000 |
| Message-ID | <XnsA02DDEEE49111eejj99@194.109.133.133> |
| In reply to | #13260 |
Gene Wirchenko wrote on 06 apr 2012 in comp.lang.javascript: > On 06 Apr 2012 07:22:13 GMT, "Evertjan." > <exjxw.hannivoort@interxnl.net> wrote: > >>Gene Wirchenko wrote on 06 apr 2012 in comp.lang.javascript: > >>>Evertjan wrote: > >>>>Think it over, why should this crash? >>>> >>>>if (alert(1)) ... >>> >>> It did not crash for me. I gave it an else clause, and that >>> clause was executed. >> >>So it was interpreted as not being false, so true. > > Uh, no. On my system, the else clause is executed when the > expression is not true. You are right here, my mistake. >>If no return was given, the code would crash/halt. > > It returned undefined. So? undefined is a valid value in Javascript. If no return was given, the code would crash/halt. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2012-04-06 13:09 -0700 |
| Message-ID | <15jun7968l8v7o03p6gsl8octbh0mloseg@4ax.com> |
| In reply to | #13263 |
On 06 Apr 2012 19:54:56 GMT, "Evertjan."
<exjxw.hannivoort@interxnl.net> wrote:
>Gene Wirchenko wrote on 06 apr 2012 in comp.lang.javascript:
>
>> On 06 Apr 2012 07:22:13 GMT, "Evertjan."
>> <exjxw.hannivoort@interxnl.net> wrote:
[snip]
>You are right here, my mistake.
Easy enough to get something reversed. That is why elsewhere I
state that I would like to be able to change defaults.
>>>If no return was given, the code would crash/halt.
>>
>> It returned undefined.
>
>So?
>
>undefined is a valid value in Javascript.
Yes, I know.
>If no return was given, the code would crash/halt.
How do you know? It could take a garbage value as well. It is
the sort of situation where the results are undefined (not the
JavaScript value). After all, if you do not play by the rules --
returning a value when you should -- you can not expect things to work
properly.
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exjxw.hannivoort@interxnl.net> |
|---|---|
| Date | 2012-04-06 20:23 +0000 |
| Message-ID | <XnsA02DE3B108485eejj99@194.109.133.133> |
| In reply to | #13264 |
Gene Wirchenko wrote on 06 apr 2012 in comp.lang.javascript: >>undefined is a valid value in Javascript. > > Yes, I know. > >>If no return was given, the code would crash/halt. > > How do you know? By testing: if (foubar) z=3; alert(z); // Uncaught ReferenceError: foubar is not defined [chrome console] > It could take a garbage value as well. It is > the sort of situation where the results are undefined (not the > JavaScript value). "results undedined" is not the same as "no result returned". I restate: Any internal or defined function returns a javascript value, like: 17, '17', true, undefined. > After all, if you do not play by the rules -- > returning a value when you should -- you can not expect things to work > properly. As if a crach is proper working. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2012-04-06 19:48 -0700 |
| Message-ID | <rlavn79qf3ittfv13h1r8ugkm9ldru26ir@4ax.com> |
| In reply to | #13266 |
On 06 Apr 2012 20:23:01 GMT, "Evertjan."
<exjxw.hannivoort@interxnl.net> wrote:
>Gene Wirchenko wrote on 06 apr 2012 in comp.lang.javascript:
[snip]
>> After all, if you do not play by the rules --
>> returning a value when you should -- you can not expect things to work
>> properly.
>
>As if a crach is proper working.
Straw man. I have made no such claim.
The code would not necessarily crash. It could give a garbage
result and possibly mess stuff up.
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | Dr J R Stockton <reply1214@merlyn.demon.co.uk.not.invalid> |
|---|---|
| Date | 2012-04-07 19:14 +0100 |
| Message-ID | <PbDcPuG1PIgPFwmY@invalid.uk.co.demon.merlyn.invalid> |
| In reply to | #13264 |
In comp.lang.javascript message <15jun7968l8v7o03p6gsl8octbh0mloseg@4ax. com>, Fri, 6 Apr 2012 13:09:10, Gene Wirchenko <genew@ocis.net> posted: > > How do you know? It could take a garbage value as well. It is >the sort of situation where the results are undefined (not the >JavaScript value). After all, if you do not play by the rules -- >returning a value when you should -- you can not expect things to work >properly. The rules say that any exit from a function returns a value of type undefined, which type has one value, defined as undefined, UNLESS the exit was by way of a "return" statement including a value after the "return" (needs to be on the same line), when that value (which may be undefined) is returned. That would be easier to say in Dutch, where some instances of undefined would (I suppose) be written as onbepaald / ongedefinieerde / etc.; and others not. -- (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME. Web <http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms and links; Astro stuff via astron-1.htm, gravity0.htm ; quotings.htm, pascal.htm, etc. No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.
[toc] | [prev] | [next] | [standalone]
| From | Dr J R Stockton <reply1214@merlyn.demon.co.uk.not.invalid> |
|---|---|
| Date | 2012-04-07 19:04 +0100 |
| Message-ID | <37PSHtFHHIgPFwjE@invalid.uk.co.demon.merlyn.invalid> |
| In reply to | #13254 |
In comp.lang.javascript message <pqlsn7p6g2mu48sho8255uc7mjjri4kri5@4ax. com>, Thu, 5 Apr 2012 19:51:33, Gene Wirchenko <genew@ocis.net> posted: >All of my examples in this post were done under IE 9. In that case, perhaps you would care to look with IE9 at <http://www.merlyn.demon.co.uk/uksumtim.htm#M4> (100kB). Do you see a bluish area containing controls and a <canvas> diagram, which changes when the radio-buttons are used? As loaded, with Both set, does it match the smaller image below, after reading the adjacent small paragraph? Are the green line and numbers consistent with your location? Ignore minor text changes, and please don't send a screen- shot. I choose to not alter time and location settings on this PC, because of other software that runs all the time on it. -- (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05. Website <http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms PAS EXE etc. : <http://www.merlyn.demon.co.uk/programs/> - see in 00index.htm Dates - miscdate.htm estrdate.htm js-dates.htm pas-time.htm critdate.htm etc.
[toc] | [prev] | [next] | [standalone]
| From | Dr J R Stockton <reply1214@merlyn.demon.co.uk.not.invalid> |
|---|---|
| Date | 2012-04-06 21:20 +0100 |
| Message-ID | <R0trkVIw$0fPFweV@invalid.uk.co.demon.merlyn.invalid> |
| In reply to | #13245 |
In comp.lang.javascript message <75frn792kreqn0t372imt8u8pj3i60i5rl@4ax. com>, Thu, 5 Apr 2012 08:51:18, Gene Wirchenko <genew@ocis.net> posted: > > 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()? > That's the hidden American in you leaking out. If writing for expatriate compatriots, Yucca might prefer to give them kyllä/ei. -- (c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME. Web <http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links. Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036) Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)
[toc] | [prev] | [next] | [standalone]
| From | Eric Bednarz <bednarz@fahr-zur-hoelle.org> |
|---|---|
| Date | 2012-04-07 02:49 +0200 |
| Message-ID | <m2zkaobc2s.fsf@nntp.bednarz.nl> |
| In reply to | #13270 |
Dr J R Stockton <reply1214@merlyn.demon.co.uk.not.invalid> writes: > Gene Wirchenko <genew@ocis.net> posted: [...] > That's the hidden American in you leaking out. For chrissake, Gene; can't your hidden American leak out any better?
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2012-04-06 19:49 -0700 |
| Message-ID | <ioavn7d26pc9j1ktpkjv64f695g6mhmiju@4ax.com> |
| In reply to | #13278 |
On Sat, 07 Apr 2012 02:49:31 +0200, Eric Bednarz
<bednarz@fahr-zur-hoelle.org> wrote:
>Dr J R Stockton <reply1214@merlyn.demon.co.uk.not.invalid> writes:
>
>> Gene Wirchenko <genew@ocis.net> posted:
>
>[...]
>
>> That's the hidden American in you leaking out.
>
>For chrissake, Gene; can't your hidden American leak out any better?
I did not know that I had one. The U.S.A. does not have a draft,
and there are no draftdodgers coming up here. (I am Canadian.)
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | Mike Duffy <Use_guestbook_page@website.in.sig> |
|---|---|
| Date | 2012-04-07 03:02 +0000 |
| Message-ID | <XnsA02DEA688DCC5invalidcom@94.75.214.39> |
| In reply to | #13280 |
Gene Wirchenko <genew@ocis.net> wrote in news:ioavn7d26pc9j1ktpkjv64f695g6mhmiju@4ax.com: > (I am Canadian.) That's North American, Gene. For Dr. Stockton, "English" means the dialect spoken in a tiny country that would completely fit inside some of our larger lakes. -- http://pages.videotron.ca/duffym/index.htm
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2012-04-06 20:38 -0700 |
| Message-ID | <sbdvn757vko9p1qh3rntiv6e841q280tku@4ax.com> |
| In reply to | #13281 |
On Sat, 7 Apr 2012 03:02:26 +0000 (UTC), Mike Duffy
<Use_guestbook_page@website.in.sig> wrote:
>Gene Wirchenko <genew@ocis.net> wrote in
>news:ioavn7d26pc9j1ktpkjv64f695g6mhmiju@4ax.com:
>
>> (I am Canadian.)
>
>That's North American, Gene. For Dr. Stockton, "English" means the dialect
That, too.
>spoken in a tiny country that would completely fit inside some of our
>larger lakes.
Uh, no. England is larger than any of the Great Lakes and Lake
Winnipeg. What other larger lakes are there?
Now, Hudson Bay is about nine times bigger than England.
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | Mike Duffy <Use_guestbook_page@website.in.sig> |
|---|---|
| Date | 2012-04-07 04:09 +0000 |
| Message-ID | <XnsA02E19D64A5Dinvalidcom@94.75.214.39> |
| In reply to | #13282 |
Gene Wirchenko <genew@ocis.net> wrote in news:sbdvn757vko9p1qh3rntiv6e841q280tku@4ax.com: > > Uh, no. England is larger than any of the Great Lakes and Lake > Winnipeg. What other larger lakes are there? I didn't say say England is bigger than any particular lake. I said it would fit into some of them. It looks like it would only take the two largest: Lake Superior: 82,100 km2 Lake Huron 60,000 km2 England 130,395 km2 And yes, I'm claiming ownership (as a North American) to these two lakes. And I could not find a mean elevation for England, so it would not surprise me if it would fit into Lake Superior. It has an average depth of 147m. -- http://pages.videotron.ca/duffym/index.htm
[toc] | [prev] | [next] | [standalone]
| From | Dr J R Stockton <reply1214@merlyn.demon.co.uk.not.invalid> |
|---|---|
| Date | 2012-04-08 19:34 +0100 |
| Message-ID | <$vKQS0DTpdgPFwzC@invalid.uk.co.demon.merlyn.invalid> |
| In reply to | #13283 |
In comp.lang.javascript message <XnsA02E19D64A5Dinvalidcom@94.75.214.39> , Sat, 7 Apr 2012 04:09:21, Mike Duffy <Use_guestbook_page@website.in.si g> posted: >Lake Superior: 82,100 km2 >Lake Huron 60,000 km2 >England 130,395 km2 English is the language of the UK, 243,610 km2, from which one should subtract an estimated quarter of 20,779 km2, for Welsh Wales, and a little more for Gaelic Scotland. But you should include the Crown Dependencies, 573 + 194 km2. -- (c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME. Web <http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links. Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036) Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)
[toc] | [prev] | [next] | [standalone]
Page 2 of 3 — ← Prev page 1 [2] 3 Next page →
Back to top | Article view | comp.lang.javascript
csiph-web