Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #15413 > unrolled thread

radio buttons with. checkbox

Started byemf <emfril@gmail.com>
First post2012-08-18 10:03 -0400
Last post2012-09-04 06:00 -0700
Articles 17 on this page of 37 — 6 participants

Back to article view | Back to comp.lang.javascript


Contents

  radio buttons with. checkbox emf <emfril@gmail.com> - 2012-08-18 10:03 -0400
    Re: radio buttons with. checkbox SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-08-18 17:36 +0200
      Re: radio buttons with. checkbox emf <emfril@gmail.com> - 2012-08-19 09:30 -0400
        Re: radio buttons with. checkbox emf <emfril@gmail.com> - 2012-08-19 12:11 -0400
          Re: radio buttons with. checkbox SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-08-20 14:00 +0200
            Re: radio buttons with. checkbox emf <emfril@gmail.com> - 2012-08-20 09:05 -0400
              Re: radio buttons with. checkbox SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-08-20 16:11 +0200
                Re: radio buttons with. checkbox emf <emfril@gmail.com> - 2012-08-21 05:25 -0400
                  Re: radio buttons with. checkbox Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-08-21 14:36 +0200
                  Re: radio buttons with. checkbox SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-08-22 12:24 +0200
        Re: radio buttons with. checkbox SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-08-20 12:13 +0200
        Re: radio buttons with. checkbox Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-08-20 16:27 +0200
          Re: radio buttons with. checkbox SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-08-20 21:58 +0200
          Re: radio buttons with. checkbox emf <emfril@gmail.com> - 2012-08-21 10:58 -0400
            Re: radio buttons with. checkbox Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-08-22 10:41 +0200
            Re: radio buttons with. checkbox "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-08-22 10:14 +0000
            Re: radio buttons with. checkbox SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-08-22 14:31 +0200
    Re: radio buttons with. checkbox Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-08-18 19:18 +0200
      Re: radio buttons with. checkbox emf <emfril@gmail.com> - 2012-08-20 08:29 -0400
        Re: radio buttons with. checkbox Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-08-20 16:25 +0200
          Re: radio buttons with. checkbox emf <emfril@gmail.com> - 2012-08-21 06:06 -0400
            Re: radio buttons with. checkbox Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-08-21 14:33 +0200
              Re: radio buttons with. checkbox emf <emfril@gmail.com> - 2012-08-21 10:51 -0400
                Re: radio buttons with. checkbox Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-08-22 11:42 +0200
                Re: radio buttons with. checkbox SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-08-22 14:27 +0200
              Re: radio buttons with. checkbox Dr J R Stockton <reply1234@merlyn.demon.co.uk.invalid> - 2012-08-22 20:24 +0100
                Re: radio buttons with. checkbox Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-08-23 11:06 +0200
                  Re: radio buttons with. checkbox Dr J R Stockton <reply1234@merlyn.demon.co.uk.invalid> - 2012-08-25 17:01 +0100
            Re: radio buttons with. checkbox Dr J R Stockton <reply1234@merlyn.demon.co.uk.invalid> - 2012-08-22 19:58 +0100
          Re: radio buttons with. checkbox emf <emfril@gmail.com> - 2012-08-22 02:20 -0400
            Re: radio buttons with. checkbox Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-08-22 10:44 +0200
            Re: radio buttons with. checkbox SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-08-22 14:40 +0200
              Re: radio buttons with. checkbox emf <emfril@gmail.com> - 2012-08-26 00:16 -0400
              Re: radio buttons with. checkbox emf <emfril@gmail.com> - 2012-09-03 07:19 -0400
      Re: radio buttons with. checkbox David Mark <dmark.cinsoft@gmail.com> - 2012-09-03 21:02 -0700
        Re: radio buttons with. checkbox Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-09-04 13:44 +0200
          Re: radio buttons with. checkbox David Mark <dmark.cinsoft@gmail.com> - 2012-09-04 06:00 -0700

Page 2 of 2 — ← Prev page 1 [2]


#15477

Fromemf <emfril@gmail.com>
Date2012-08-21 06:06 -0400
Message-ID<k0vmcr$v9a$1@speranza.aioe.org>
In reply to#15465
On 2012-08-20 10:25 Thomas 'PointedEars' Lahn wrote:
> emf wrote:
>
>> On 2012-08-18 13:18 Thomas 'PointedEars' Lahn wrote:
>>> emf wrote:
>>> ^^^
>>> Who?
>>
>> Check the sig in this message.
>
> Your sig does not contain your real name.  Regardless, your real name
> belongs in the From header field value on Usenet (except in groups with
> sensitive topics).  Any nicknames may be put in quotes in-between.

At one point, sometime in the late nineties, I was shocked when I did a 
search for my name and to find *all* the messages I had posted to 
newsgroups. So I decided not to use my name directly, but let friendly 
correspondents who care enough about me to discover it themselves. 
Newsgroups like this may not have sensitive topics, in the past, 
however, I have made some idiotic mistakes or asked foolish questions 
that I would rather not have associated with my real name in perpetuity. 
At least now someone will have to do some detective work to find what I 
have written, and hopefully these damned robots won't care to start 
doing this any time soon.

>>> ²  <http://www.useit.com/alertbox/20000416.html>
>>
>> I believe I've solved the problems, though I am not sure that there are
>> other more elegant solutions:
>>
>> https://files.nyu.edu/emf202/public/js/spherical2.html
>>
>> Instead of disabling the checkbox, I have it disappear.
>
> Bad idea.

OK, I changed my mind again, with the addition that when the radians 
radio button is checked, the checkbox is also unchecked.

>> I had to reset the form onload, because when reloading the webpage,
>> something that I had to do often when working on the code, the checks
>> would not change from what they were before, while the using would change.
>
> That is what users expect, as they have asked the Mozilla people to
> implement it so.  You should not work against their expectations.

OK again. Now that I have added a call to inputOutput() right after the 
radiobuttons and the checkbox are loaded, it is not necessary to reset 
the form when reloading.

>> And instead of
>> <input type="reset"...> I now use
>>
>> <input type="button" ... onclick="clearValues()>
>
> Another bad idea.  You can keep the reset button (if you must) *and* use an
> event-handler attribute on it.

I have to think about this. I certainly prefer to clear only the 
textfields and keep the buttons and checkbox unchanged, in case someone 
has to solve a number of problems using the same input/output. It's not 
immediately obvious to me how I could implement what you refer to. In 
the meantime Sam's code has greatly improved the appearance of the function.

>> PS. How do you insert number superscripts when typing a message? I am
>> using DejaVu fonts that has in superscript form all the numbers, but I
>> do not see an easier way to insert them than by opening the Character Map.
>
> Using XKB and typing `^1' etc. (without quotes).
>
> PointedEars

Thanks. It also works in Thunderbird. I've been thinking one day of 
using subscripts in JavaScript code too (C₁, C₂ instead of C1, C2) but 
that will have to wait until at least all the main fonts contain U-2070 
to U-2090 characters (like the DejaVu fonts do). I hope you do not 
object to my using π instead of Math.PI? That was easy for me to 
implement, because I am used to alternating between the Greek and the 
English keyboards.

Now I am updating

https://files.nyu.edu/emf202/public/js/spherical.html

and have deleted spherical2.html.

I have made changes to the solveSpherical.js too; decided to simplify 
the variable names. And added a couple of else statement to avoid 
getting (hopefully) any NaN results.

emf

-- 
Date Calculator with all-purpose JS code
https://files.nyu.edu/emf202/public/js/dateCalculator.html

[toc] | [prev] | [next] | [standalone]


#15478

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2012-08-21 14:33 +0200
Message-ID<1615644.IcWXoroVV2@PointedEars.de>
In reply to#15477
emf wrote:

> On 2012-08-20 10:25 Thomas 'PointedEars' Lahn wrote:
> however, I have made some idiotic mistakes or asked foolish questions
> that I would rather not have associated with my real name in perpetuity.

IOW, you are not willing to stand by your mistakes, which demonstrates a 
serious lack of character.

> At least now someone will have to do some detective work to find what I
> have written, and hopefully these damned robots won't care to start
> doing this any time soon.

IOW, you are not willing to show your readers the basic simple courtesy of 
introducing yourself, and you are shifting your burdens onto your readers.  
Do not be surprised if your readers are not willing to read, let alone 
download, your postings then.

>>> And instead of
>>> <input type="reset"...> I now use
>>>
>>> <input type="button" ... onclick="clearValues()>
>>
>> Another bad idea.  You can keep the reset button (if you must) *and* use
>> an event-handler attribute on it.
> 
> I have to think about this. I certainly prefer to clear only the
> textfields and keep the buttons and checkbox unchanged, in case someone
> has to solve a number of problems using the same input/output. It's not
> immediately obvious to me how I could implement what you refer to.

<input type="reset" onclick="…">

> In the meantime Sam's code has greatly improved the appearance of the
> function.

AFAIK, his first name is Stéphane.

>>> PS. How do you insert number superscripts when typing a message? I am
>>> using DejaVu fonts that has in superscript form all the numbers, but I
>>> do not see an easier way to insert them than by opening the Character
>>> Map.
>>
>> Using XKB and typing `^1' etc. (without quotes).
> 
> Thanks. It also works in Thunderbird.

It works in Thunderbird on the X Window System as it works in KNode on the X 
Window System.  Thunderbird on Windows, on the other hand, only replaces ^ 
followed by 1 with ¹ *when the message is displayed*, while on the X Window 
System with XKB I can *type* the Unicode character by typing ^ immediately 
followed by 1.  That is a different thing.

> I've been thinking one day of using subscripts in JavaScript code too (C₁,
> C₂ instead of C1, C2) but that will have to wait until at least all the
> main fonts contain U-2070 to U-2090 characters (like the DejaVu fonts do).

Subscripted numbers must not be part of an Identifier or IdentifierName as 
they are not within the allowed subsets, see the ECMAScript Language 
Specification, 5.1 Edition, section 7.6:

<http://ecma-international.org/ecma-262/5.1/#sec-7.6>

> I hope you do not object to my using π instead of Math.PI?

If you write

  var π = Math.PI;

and then use π throughout, your code is (other errors aside) a syntactically 
valid ECMAScript Program (π has the Unicode Ll [lowercase letter] property).

If you use π afterwards repeatedly instead of Math.PI, there will be a 
slight increase in performance as the effective scope chain is likely 
shorter and fewer property lookups are required – 1 (π) instead of 2 (Math 
and Math.PI).

However, it will probably not be backwards-compatible to JScript < 5.5.6330, 
JavaScript < 1.5, V8 < 3.7.12.12, JavaScriptCore < 531.22.7, Opera < 7.02, 
and KJS < 4.6.5.  It will also require the file to be encoded using a 
Unicode or compatible encoding, such as UTF-8, and the encoding declared as 
such when transmitting it via HTTP.

> That was easy for me to implement, because I am used to alternating
> between the Greek and the English keyboards.

I have defined π at AltGr-p on this Swiss German keyboard:

    key <AD10> { [          p,          P,    Greek_pi,        U220F ]  };
 

PointedEars
-- 
var bugRiddenCrashPronePieceOfJunk = (
    navigator.userAgent.indexOf('MSIE 5') != -1
    && navigator.userAgent.indexOf('Mac') != -1
)  // Plone, register_function.js:16

[toc] | [prev] | [next] | [standalone]


#15480

Fromemf <emfril@gmail.com>
Date2012-08-21 10:51 -0400
Message-ID<k1073n$7f8$1@speranza.aioe.org>
In reply to#15478
On 2012-08-21 08:33 Thomas 'PointedEars' Lahn wrote:
> emf wrote:
>
>> On 2012-08-20 10:25 Thomas 'PointedEars' Lahn wrote:
>> however, I have made some idiotic mistakes or asked foolish questions
>> that I would rather not have associated with my real name in perpetuity.
>
> IOW, you are not willing to stand by your mistakes,

or that I have made same real serious blunders that I would rather not 
be reminded of.

  which demonstrates a
> serious lack of character.
>
>> At least now someone will have to do some detective work to find what I
>> have written, and hopefully these damned robots won't care to start
>> doing this any time soon.
>
> IOW, you are not willing to show your readers the basic simple courtesy of
> introducing yourself,

When we meet people in a public place, we may well like someone we meet 
but still consider it improbable that the chance meeting will lead to 
acquaintance or further, we often do not introduce ourselves. When we 
meet again, we start learning more from each other.

  and you are shifting your burdens onto your readers.
> Do not be surprised if your readers are not willing to read, let alone
> download, your postings then.

I have to admit that I like to entice people to visit my sigs if they 
want to learn more about me. Otherwise, they should be satisfied to 
kknow what I write in my postings.
>
>>>> And instead of
>>>> <input type="reset"...> I now use
>>>>
>>>> <input type="button" ... onclick="clearValues()>
>>>
>>> Another bad idea.  You can keep the reset button (if you must) *and* use
>>> an event-handler attribute on it.
>>
>> I have to think about this. I certainly prefer to clear only the
>> textfields and keep the buttons and checkbox unchanged, in case someone
>> has to solve a number of problems using the same input/output. It's not
>> immediately obvious to me how I could implement what you refer to.
>
> <input type="reset" onclick="…">

I'll work on it, though at this point I do not understand the difference 
between setting the type to reset instead of button, if what will happen 
is determined by the onclick.

>
>> In the meantime Sam's code has greatly improved the appearance of the
>> function.
>
> AFAIK, his first name is Stéphane.
>
>>>> PS. How do you insert number superscripts when typing a message? I am
>>>> using DejaVu fonts that has in superscript form all the numbers, but I
>>>> do not see an easier way to insert them than by opening the Character
>>>> Map.
>>>
>>> Using XKB and typing `^1' etc. (without quotes).
>>
>> Thanks. It also works in Thunderbird.
>
> It works in Thunderbird on the X Window System as it works in KNode on the X
> Window System.  Thunderbird on Windows, on the other hand, only replaces ^
> followed by 1 with ¹ *when the message is displayed*, while on the X Window
> System with XKB I can *type* the Unicode character by typing ^ immediately
> followed by 1.  That is a different thing.
>
>> I've been thinking one day of using subscripts in JavaScript code too (C₁,
>> C₂ instead of C1, C2) but that will have to wait until at least all the
>> main fonts contain U-2070 to U-2090 characters (like the DejaVu fonts do).
>
> Subscripted numbers must not be part of an Identifier or IdentifierName as
> they are not within the allowed subsets, see the ECMAScript Language
> Specification, 5.1 Edition, section 7.6:
>
> <http://ecma-international.org/ecma-262/5.1/#sec-7.6>

As things are going, I think it's a matter of time when we will be able 
to use subscripts too.

>> I hope you do not object to my using π instead of Math.PI?
>
> If you write
>
>    var π = Math.PI;
>
> and then use π throughout, your code is (other errors aside) a syntactically
> valid ECMAScript Program (π has the Unicode Ll [lowercase letter] property).
>
> If you use π afterwards repeatedly instead of Math.PI, there will be a
> slight increase in performance as the effective scope chain is likely
> shorter and fewer property lookups are required – 1 (π) instead of 2 (Math
> and Math.PI).
>
> However, it will probably not be backwards-compatible to JScript < 5.5.6330,
> JavaScript < 1.5, V8 < 3.7.12.12, JavaScriptCore < 531.22.7, Opera < 7.02,
> and KJS < 4.6.5.  It will also require the file to be encoded using a
> Unicode or compatible encoding, such as UTF-8, and the encoding declared as
> such when transmitting it via HTTP.

I always use UTF-8 and always declare it in the http. Also, more often 
than not, I save even txt files in Unicode.

Thinking to use π was a sudden flash of inspiration - why not? It should 
be possible! - and I was happy to find out that it worked OK.

>> That was easy for me to implement, because I am used to alternating
>> between the Greek and the English keyboards.
>
> I have defined π at AltGr-p on this Swiss German keyboard:
>
>      key <AD10> { [          p,          P,    Greek_pi,        U220F ]  };
>
>
> PointedEars

Over here, I use the Windows shortcut Ctrl+Shift to switch between the 
English and the Greek keyboard. I can type without looking at the 
keyboard on both.

emf

-- 
Epitaphios - Axion Esti - Canto General
Three important folk compositions of Mikis Theodorakis
https://files.nyu.edu/emf202/public/mt/index.html

[toc] | [prev] | [next] | [standalone]


#15494

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2012-08-22 11:42 +0200
Message-ID<1416755.0byJLMr6tA@PointedEars.de>
In reply to#15480
emf wrote:

> On 2012-08-21 08:33 Thomas 'PointedEars' Lahn wrote:
>> emf wrote:
>>> On 2012-08-20 10:25 Thomas 'PointedEars' Lahn wrote:
>>> however, I have made some idiotic mistakes or asked foolish questions
>>> that I would rather not have associated with my real name in perpetuity.
>>
>> IOW, you are not willing to stand by your mistakes,
> 
> or that I have made same real serious blunders that I would rather not
> be reminded of.

AISB.  We all did serious blunders once.  One of them is not to post under 
one's real name on Usenet, which is there to learn.
 
>> <input type="reset" onclick="…">
> 
> I'll work on it, though at this point I do not understand the difference
> between setting the type to reset instead of button, if what will happen
> is determined by the onclick.

A reset button works regardless whether there is client-side script support.

>>> I've been thinking one day of using subscripts in JavaScript code too
>>> (C₁, C₂ instead of C1, C2) but that will have to wait until at least all
>>> the main fonts contain U-2070 to U-2090 characters (like the DejaVu
>>> fonts do).
>> Subscripted numbers must not be part of an Identifier or IdentifierName
>> as they are not within the allowed subsets, see the ECMAScript Language
>> Specification, 5.1 Edition, section 7.6:
>>
>> <http://ecma-international.org/ecma-262/5.1/#sec-7.6>
> 
> As things are going, I think it's a matter of time when we will be able
> to use subscripts too.

That would be unwise.

>> However, it will probably not be backwards-compatible to JScript <
>> 5.5.6330, JavaScript < 1.5, V8 < 3.7.12.12, JavaScriptCore < 531.22.7,
>> Opera < 7.02, and KJS < 4.6.5.  It will also require the file to be
>> encoded using a Unicode or compatible encoding, such as UTF-8, and the
>> encoding declared as such when transmitting it via HTTP.
> 
> I always use UTF-8 and always declare it in the http. Also, more often
> than not, I save even txt files in Unicode.

You mean in _a_ Unicode _encoding_.  If you are only writing for yourself, 
that's fine.  You did not even ask about the compatibility concerns that I 
raised – you have a lot to learn.

> Thinking to use π was a sudden flash of inspiration - why not? It should
> be possible! - and I was happy to find out that it worked OK.

At least Lea Verou had that flash of inspiration months ago (regardless what 
could be said about her other attempts at client-side script programming).
 

PointedEars
-- 
When all you know is jQuery, every problem looks $(olvable).

[toc] | [prev] | [next] | [standalone]


#15498

FromSAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid>
Date2012-08-22 14:27 +0200
Message-ID<5034d039$0$6188$ba4acef3@reader.news.orange.fr>
In reply to#15480
Le 21/08/12 16:51, emf a écrit :
>> <input type="reset" onclick="…">
>
> I'll work on it, though at this point I do not understand the difference
> between setting the type to reset instead of button, if what will happen
> is determined by the onclick.


The input reset button make all as it was on loading
(every changes by visitor are deleted)

You may do something like :

<input type="reset" onclick="
   setTimeout(function() {
     document.formData.formats[0].checked = using=='r';
     document.formData.formats[1].checked = using!='r';
     },
     200);">


-- 
Stéphane Moriaux avec/with iMac-intel

[toc] | [prev] | [next] | [standalone]


#15507

FromDr J R Stockton <reply1234@merlyn.demon.co.uk.invalid>
Date2012-08-22 20:24 +0100
Message-ID<yQajd4FkHTNQFwFR@invalid.uk.co.demon.merlyn.invalid>
In reply to#15478
In comp.lang.javascript message <1615644.IcWXoroVV2@PointedEars.de>,
Tue, 21 Aug 2012 14:33:41, Thomas 'PointedEars' Lahn
<PointedEars@web.de> posted:

>
>IOW, you are not willing to stand by your mistakes, which demonstrates a
>serious lack of character.
>

Not correcting one's errors is worse.  Two relatively minor ones on your
Web site are "radiant" (maybe 255 times) and "gradiant" (maybe 256
times).  An inadequate knowledge of English is excusable in some
foreigners, and expected in others; but one who chooses to write on a
technical matter should at least get the technical bit right - though in
this case the long-standing error is so obvious that anyone who is
misled by it deserves to be - perhaps it is an "Angkor Apeiron".

-- 
 (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]


#15510

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2012-08-23 11:06 +0200
Message-ID<2532184.nc9jZIu4Zn@PointedEars.de>
In reply to#15507
Dr J R Stockton wrote:

> Thomas 'PointedEars' Lahn posted:
>> IOW, you are not willing to stand by your mistakes, which demonstrates a
>> serious lack of character.
> 
> Not correcting one's errors is worse.  Two relatively minor ones on your
> Web site are "radiant" (maybe 255 times) and "gradiant" (maybe 256
> times).  An inadequate knowledge of English is excusable in some
> foreigners, and expected in others; but one who chooses to write on a
> technical matter should at least get the technical bit right - though in
> this case the long-standing error is so obvious that anyone who is
> misled by it deserves to be - perhaps it is an "Angkor Apeiron".
                                                  ^^^^^^^^^^^^^^

Thanks, fixed (it was not there as a means for detecting plagiarism; it is 
simply called "Radiant", and I had also thought "Gradiant", in German, 
respectively).  I have also fixed the gradian (gon) support in the custom 
trigonometrical functions that use the corresponding "constant" (the angle 
for a full circle is 400 gon, not 300 gon as I thought).

However, there was only one occurrence for each named mistake in the source 
code (comments); the number of occurrences on the Web site is merely a 
result of them being dragged along in the SVN repository through the years, 
which is published with all revisions at <http://PointedEars.de/websvn>.

Since I am not using math.js (this part now split into math/float.js) that 
often, those scripts have not undergone the same degree of review and 
testing as other scripts (yet); they are not production quality (yet).

I can only hope that your comment was motivated by an appreciation of what I 
am trying to do there, by someone interested in mathematics, and not made 
merely for the sake of pointing out publicly that I too make mistakes.  If 
the former applies, I would appreciate corrections of further mistakes in 
those scripts and further suggestions as to how they could be improved, via 
any communication channels that you see fit.


PointedEars
-- 
Sometimes, what you learn is wrong. If those wrong ideas are close to the 
root of the knowledge tree you build on a particular subject, pruning the 
bad branches can sometimes cause the whole tree to collapse.
  -- Mike Duffy in cljs, <news:Xns9FB6521286DB8invalidcom@94.75.214.39>

[toc] | [prev] | [next] | [standalone]


#15564

FromDr J R Stockton <reply1234@merlyn.demon.co.uk.invalid>
Date2012-08-25 17:01 +0100
Message-ID<A83vGDHfbPOQFwYz@invalid.uk.co.demon.merlyn.invalid>
In reply to#15510
In comp.lang.javascript message <2532184.nc9jZIu4Zn@PointedEars.de>,
Thu, 23 Aug 2012 11:06:35, Thomas 'PointedEars' Lahn
<PointedEars@web.de> posted:

>I can only hope that your comment was motivated by an appreciation of what I
>am trying to do there, by someone interested in mathematics, and not made
>merely for the sake of pointing out publicly that I too make mistakes.  If
>the former applies, I would appreciate corrections of further mistakes in
>those scripts and further suggestions as to how they could be improved, via
>any communication channels that you see fit.
>

It was to show up your unreliability.  The "300/400" error has been
alluded to before.

That reminds me - there is some form of "3/4" error in the extinct
Safari for Windows Date Object.  A report on what Safari 6 shows for the
relevant parts of <http://www.merlyn.demon.co.uk/js-datex.htm> should be
of interest.

-- 
 (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]


#15506

FromDr J R Stockton <reply1234@merlyn.demon.co.uk.invalid>
Date2012-08-22 19:58 +0100
Message-ID<NBl8pnEZvSNQFwS2@invalid.uk.co.demon.merlyn.invalid>
In reply to#15477
In comp.lang.javascript message <k0vmcr$v9a$1@speranza.aioe.org>, Tue,
21 Aug 2012 06:06:25, emf <emfril@gmail.com> posted:

>Date Calculator with all-purpose JS code
>https://files.nyu.edu/emf202/public/js/dateCalculator.html

How can it be all-purpose when it does not even include ISO 8601 Week-
Numbering Dates, in use throughout the civilized world?

Date function isValid is far longer than it needs to be.

-- 
 (c) John Stockton, nr London UK               Reply address via Home Page.
   news:comp.lang.javascript FAQ <http://www.jibbering.com/faq/index.html>.
   <http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
   <http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.

[toc] | [prev] | [next] | [standalone]


#15489

Fromemf <emfril@gmail.com>
Date2012-08-22 02:20 -0400
Message-ID<k11ti2$9pn$1@speranza.aioe.org>
In reply to#15465
On 2012-08-20 10:25 Thomas 'PointedEars' Lahn wrote:
> emf wrote:
>
>> On 2012-08-18 13:18 Thomas 'PointedEars' Lahn wrote:
>
>> And instead of
>> <input type="reset"...> I now use
>>
>> <input type="button" ... onclick="clearValues()>
>
> Another bad idea.  You can keep the reset button (if you must) *and* use an
> event-handler attribute on it.

However, according to the W3schools.com

http://www.w3schools.com/tags/att_input_type.asp

Attribute Values

Value   Description

button	Defines a clickable button (mostly used with a JavaScript to
	activate a script)
reset 	Defines a reset button. A reset button resets all form fields
	to their initial values

The description of button makes explicit reference to javascript. The 
reset button is used to reset all form fields. It doesn't seem logical 
to me to use the reset and then go on to annul its html effects by 
specifying what will happen with onclick.

Anyway, the issue is an academic one; as long as one includes an 
onclick, it doesn't make any difference whether the type is button or reset.

emf

-- 
Spherical Triangle Calculator
https://files.nyu.edu/emf202/public/js/spherical.html

[toc] | [prev] | [next] | [standalone]


#15491

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2012-08-22 10:44 +0200
Message-ID<5992689.M5LzbLg6vR@PointedEars.de>
In reply to#15489
emf wrote:

> On 2012-08-20 10:25 Thomas 'PointedEars' Lahn wrote:
>> emf wrote:
>>> On 2012-08-18 13:18 Thomas 'PointedEars' Lahn wrote:
>>> And instead of
>>> <input type="reset"...> I now use
>>>
>>> <input type="button" ... onclick="clearValues()>
>>
>> Another bad idea.  You can keep the reset button (if you must) *and* use
>> an event-handler attribute on it.
> 
> However, according to the W3schools.com
> 
> http://www.w3schools.com/tags/att_input_type.asp

Whatever you read there, you should be more picky on your resources.  
W3Schools is junk (and it does not have anything to do with the W3C).


PointedEars
-- 
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee

[toc] | [prev] | [next] | [standalone]


#15500

FromSAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid>
Date2012-08-22 14:40 +0200
Message-ID<5034d334$0$6203$ba4acef3@reader.news.orange.fr>
In reply to#15489
Le 22/08/12 08:20, emf a écrit :
>
> Anyway, the issue is an academic one; as long as one includes an
> onclick, it doesn't make any difference whether the type is button or
> reset.

see my example given otherwise

Maybe next week will you add new functions to your app (your page) as a 
converter of radians to degrees or I don't know what
and will you be glad to do nothing more in the JS script because you 
used the reset button instead of generic one


anyway ...
a form *must* (would have?) to have a submit AND a reset buttons

-- 
Stéphane Moriaux avec/with iMac-intel

[toc] | [prev] | [next] | [standalone]


#15566

Fromemf <emfril@gmail.com>
Date2012-08-26 00:16 -0400
Message-ID<k1c7ns$ort$1@speranza.aioe.org>
In reply to#15500
On 2012-08-22 08:40 SAM wrote:
> Le 22/08/12 08:20, emf a écrit :
>>
>> Anyway, the issue is an academic one; as long as one includes an
>> onclick, it doesn't make any difference whether the type is button or
>> reset.
>
> see my example given otherwise
>
> Maybe next week will you add new functions to your app (your page) as a
> converter of radians to degrees or I don't know what
> and will you be glad to do nothing more in the JS script because you
> used the reset button instead of generic one
>
>
> anyway ...
> a form *must* (would have?) to have a submit AND a reset buttons

Actually I've been thinking of adding a small deg2rad calculator to the 
webpage, but it's going to be in a second form. (I'd like to go over 
some exercises in a book that wants the angles in degrees and the sides 
in radians.) I'll keep your comments in mind, and return to them as 
necessary. You and Thomas in his own way have provided me a lot of help 
and I am grateful to you both.

I steamlined a little the inputOutput(). Now it has a return and it is 
called only once, from calculate().

It's surprising, but the only one other "similar" calculator I located 
on the web is this:

http://www.had2know.com/academics/spherical-trigonometry-calculator.html

Less ambitious, of course, than mine, and besides they have solved the 
problem of the ambiguous cases by returning only one of them... You have 
to reload the page after each calculation, otherwise you may get false 
results, and it has a but, returning the wrong result in one case.

Eustace

-- 
Spherical Triangle Calculator
https://files.nyu.edu/emf202/public/js/spherical.html

[toc] | [prev] | [next] | [standalone]


#15662

Fromemf <emfril@gmail.com>
Date2012-09-03 07:19 -0400
Message-ID<k223hl$bm9$1@speranza.aioe.org>
In reply to#15500
In case any one is still following this thread:

The remaining thing that bothered me was the fact that the imputOutput() 
function was performing 2 distinct things: returning using or changing 
the selections in the radio buttons and checkbox.

I decided to include an argument (n) that would guide it to do either 
the one of the other.

I wish I could think of a more descriptive variable name, but for now n 
will have to do.

Cheers,

emf

-- 
Spherical Triangle Calculator
https://files.nyu.edu/emf202/public/js/spherical.html

[toc] | [prev] | [next] | [standalone]


#15677

FromDavid Mark <dmark.cinsoft@gmail.com>
Date2012-09-03 21:02 -0700
Message-ID<844fb2cd-8362-4716-82a9-0f6bc509f47e@o8g2000yqm.googlegroups.com>
In reply to#15428
On Aug 18, 1:18 pm, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
> emf wrote:
>
> ^^^
> Who?

I think that's the name of a one-hit-wonder pop band from the early
90's. Guess they are back (and programming JS!) :)

[snip]

.html>
>
> > […]
> >                  <label for="rads" style="padding-right:1em;">
> >                      <input type="radio" name="formats"
> >                        onClick="inputOutput(0)";> Radians
> >                  </label>
> >                   <label for="degr" style="padding-right:1em;">
> >                       <input type="radio" name="formats"
> >                         onClick="inputOutput(1)"; checked> Degrees
> >                  </label>
> >                 <label for="dgmn2" style="padding-right:1em;">
> >                      <input type="checkbox" name="dgmn"
> >                        onClick="inputOutput(2)"> deg°min'
> >                  </label>
> > ...
>
> Your LABEL elements do not work (clicking them does not focus the control)
> in Chromium 21.0.1180.75 Built on Debian wheezy/sid, running on Debian 6.0.5
> (150248), and most certainly other browsers, because you have not specified
> the `rads' aso. IDs on the corresponding form controls.  With this approach,
> you need to omit the `for' attribute on the LABEL elements.

For as long as I can remember, Chrome has failed to focus checkboxes
and radio buttons on clicking their labels (or even on clicking the
controls themselves!) Have always had to account for this with script
(which really sucks).

Of course, in the case above, I'm sure it fails to activate the
controls as well. As mentioned, that failure is on the developer.

[toc] | [prev] | [next] | [standalone]


#15688

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2012-09-04 13:44 +0200
Message-ID<1707593.N75dt4Fg3R@PointedEars.de>
In reply to#15677
David Mark wrote:

> Thomas 'PointedEars' Lahn wrote:
>> emf wrote:
>> ^^^
>> Who?
> 
> I think that's the name of a one-hit-wonder pop band from the early
> 90's. Guess they are back (and programming JS!) :)

:)

>> > […]
>> > <label for="rads" style="padding-right:1em;">
>> > <input type="radio" name="formats"
>> > onClick="inputOutput(0)";> Radians
>> > </label>
>> > <label for="degr" style="padding-right:1em;">
>> > <input type="radio" name="formats"
>> > onClick="inputOutput(1)"; checked> Degrees
>> > </label>
>> > <label for="dgmn2" style="padding-right:1em;">
>> > <input type="checkbox" name="dgmn"
>> > onClick="inputOutput(2)"> deg°min'
>> > </label>
>> > ...
>>
>> Your LABEL elements do not work (clicking them does not focus the
>> control) in Chromium 21.0.1180.75 Built on Debian wheezy/sid, running on
>> Debian 6.0.5 (150248), and most certainly other browsers, because you
>> have not specified the `rads' aso. IDs on the corresponding form
>> controls.  With this approach, you need to omit the `for' attribute on
>> the LABEL elements.
> 
> For as long as I can remember, Chrome has failed to focus checkboxes
> and radio buttons on clicking their labels

Confirmed.  Using the key defined in the `accesskey' attribute value moves 
the input focus to the control, though.  You should report that as a bug if 
not reported already.

However, what I meant was that the LABEL elements do not *trigger* the 
control, which they could if the markup was Valid.  This is not limited to 
Chromium or Chrome.

> (or even on clicking the controls themselves!) Have always had to account
> for this with script (which really sucks).
> 
> Of course, in the case above, I'm sure it fails to activate the
> controls as well. As mentioned, that failure is on the developer.

It is also on the user and the savvy developer who, observing a flaw, do not 
report it or submit a patch for it, respectively (see [0]).  After all, 
improvement of open-source software, and free software in particular, 
depends on individual initiative.  Chromium, on which the Chromium Browser 
and Google Chrome are based, is released under a variety of open-source 
licenses [1].  The Google-authored part of Chromium is released under the 
Modified BSD License [2], a permissive, GPL-compatible free software license 
[3].


PointedEars
___________
[0] <http://www.chromium.org/for-testers/bug-reporting-guidelines>
[1] <http://en.wikipedia.org/wiki/Chromium_(web_browser)#Licensing>
[2] <http://src.chromium.org/viewvc/chrome/trunk/src/LICENSE?view=markup>
[3] <http://www.gnu.org/licenses/license-list.html#ModifiedBSD>
-- 
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
  -- Richard Cornford, cljs, <f806at$ail$1$8300dec7@news.demon.co.uk>

[toc] | [prev] | [next] | [standalone]


#15690

FromDavid Mark <dmark.cinsoft@gmail.com>
Date2012-09-04 06:00 -0700
Message-ID<561139af-69ea-4dd1-b60f-a4072cce615d@e14g2000yqm.googlegroups.com>
In reply to#15688
On Sep 4, 7:44 am, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
> David Mark wrote:
> > Thomas 'PointedEars' Lahn wrote:
> >> emf wrote:
> >> ^^^
> >> Who?
>
> > I think that's the name of a one-hit-wonder pop band from the early
> > 90's. Guess they are back (and programming JS!) :)
>
> :)
>
>
>
>
>
>
>
>
>
> >> > […]
> >> > <label for="rads" style="padding-right:1em;">
> >> > <input type="radio" name="formats"
> >> > onClick="inputOutput(0)";> Radians
> >> > </label>
> >> > <label for="degr" style="padding-right:1em;">
> >> > <input type="radio" name="formats"
> >> > onClick="inputOutput(1)"; checked> Degrees
> >> > </label>
> >> > <label for="dgmn2" style="padding-right:1em;">
> >> > <input type="checkbox" name="dgmn"
> >> > onClick="inputOutput(2)"> deg°min'
> >> > </label>
> >> > ...
>
> >> Your LABEL elements do not work (clicking them does not focus the
> >> control) in Chromium 21.0.1180.75 Built on Debian wheezy/sid, running on
> >> Debian 6.0.5 (150248), and most certainly other browsers, because you
> >> have not specified the `rads' aso. IDs on the corresponding form
> >> controls.  With this approach, you need to omit the `for' attribute on
> >> the LABEL elements.
>
> > For as long as I can remember, Chrome has failed to focus checkboxes
> > and radio buttons on clicking their labels
>
> Confirmed.  Using the key defined in the `accesskey' attribute value moves
> the input focus to the control, though.  You should report that as a bug if
> not reported already.
>
> However, what I meant was that the LABEL elements do not *trigger* the
> control, which they could if the markup was Valid.  This is not limited to
> Chromium or Chrome.

Right. Activate, trigger, check, uncheck, etc.

>
> > (or even on clicking the controls themselves!) Have always had to account
> > for this with script (which really sucks).
>
> > Of course, in the case above, I'm sure it fails to activate the
> > controls as well. As mentioned, that failure is on the developer.
>
> It is also on the user and the savvy developer who, observing a flaw, do not
> report it or submit a patch for it, respectively (see [0]).  After all,
> improvement of open-source software, and free software in particular,
> depends on individual initiative.  Chromium, on which the Chromium Browser
> and Google Chrome are based, is released under a variety of open-source
> licenses [1].  The Google-authored part of Chromium is released under the
> Modified BSD License [2], a permissive, GPL-compatible free software license
> [3].

IIRC, I looked into it and it had either been reported and dismissed
as a non-issue or they were working on it. It's been years and I have
to figure that's been noticed by others by now.

Will look again when I have the chance.

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.javascript


csiph-web