Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #12383
| From | Dr J R Stockton <reply1209@merlyn.demon.co.uk> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Radio Buttons |
| Date | 2012-03-03 20:26 +0000 |
| Organization | Home |
| Message-ID | <c02oU7Ex5nUPFw3i@invalid.uk.co.demon.merlyn.invalid> (permalink) |
| References | <jipbof$ptp$1@speranza.aioe.org> |
In comp.lang.javascript message <jipbof$ptp$1@speranza.aioe.org>, Thu, 1
Mar 2012 21:38:38, emf <emfril@gmail.com> posted:
>
>Is there a way for a radio button to get checked not only when you
>click directly on it, but also when you click on its legend (in the
>above example NBC: etc.), so it won't be difficult to aim the mouse?
The standard way is with label.
The following, tested only in Firefox 10.0.2, Win XP sp3, shows how a
much larger area can be provided; doubtless someone will tell you how to
prevent two alerts if the actual button is hit.
<form name=fred onclick="Boo(this)"
style="background:lime; text-align:center;""
<br><br><br><br><br><br>
<input type=radio name=tony
onClick="alert('radio onclick speaking!')">
<br><br><br><br><br><br>
</form>
<script>
function Boo(F) { F.tony.click() }
</script>
There should be a way to style the size of radiobuttons and checkboxes,
but I've not found it.
One could emulate large buttons and boxes by using suitable Unicode
characters in another type of element, perhaps even an ordinary button.
--
(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)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Radio Buttons emf <emfril@gmail.com> - 2012-03-01 21:38 -0500
Re: Radio Buttons "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-03-02 08:49 +0200
Re: Radio Buttons Swifty <steve.j.swift@gmail.com> - 2012-03-02 09:01 +0000
Re: Radio Buttons "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-03-02 14:13 +0000
Re: Radio Buttons BootNic <bootnic.bounce@gmail.com> - 2012-03-02 01:54 -0500
Re: Radio Buttons emf <emfril@gmail.com> - 2012-03-02 23:24 -0500
Re: Radio Buttons "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-03-03 10:35 +0000
Re: Radio Buttons Dr J R Stockton <reply1209@merlyn.demon.co.uk> - 2012-03-03 20:26 +0000
Re: Radio Buttons SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-03-06 17:48 +0100
Re: Radio Buttons "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-03-06 19:06 +0000
Re: Radio Buttons Dr J R Stockton <reply1210@merlyn.demon.co.uk> - 2012-03-07 19:31 +0000
csiph-web