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


Groups > comp.lang.javascript > #15477

Re: radio buttons with. checkbox

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail
From emf <emfril@gmail.com>
Newsgroups comp.lang.javascript
Subject Re: radio buttons with. checkbox
Date Tue, 21 Aug 2012 06:06:25 -0400
Organization Aioe.org NNTP Server
Lines 95
Message-ID <k0vmcr$v9a$1@speranza.aioe.org> (permalink)
References <k0o75t$iac$1@speranza.aioe.org> <2760364.jIkiNM8doB@PointedEars.de> <k0tacn$l8s$1@speranza.aioe.org> <2066056.VtcmPVeGr1@PointedEars.de>
NNTP-Posting-Host 0TwZFiCKdG8YlFEabaN4bQ.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
X-Complaints-To abuse@aioe.org
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20120713 Thunderbird/14.0
X-Notice Filtered by postfilter v. 0.8.2
Xref csiph.com comp.lang.javascript:15477

Show key headers only | View raw


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

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

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

csiph-web