Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #34406
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Buttons glowing on being selected |
| Date | Mon, 18 Dec 2017 17:12:06 +0000 |
| Organization | A noiseless patient Spider |
| Lines | 27 |
| Message-ID | <87zi6gx8nt.fsf@bsb.me.uk> (permalink) |
| References | <e5c8e291-3051-4e66-a51c-83c853241976@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| Injection-Info | reader02.eternal-september.org; posting-host="54067e72912130700b971a3f19697c56"; logging-data="11465"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19af3B1EgqSK/88+PVqfKbYKTxtQ0dJtW4=" |
| Cancel-Lock | sha1:KoRPjx7oyGCaclO2fMtTKvLYLK4= sha1:T4bkoNLOLuaJFw+sMSlQr9IlktI= |
| X-BSB-Auth | 1.302fc93e51702926736d.20171218171206GMT.87zi6gx8nt.fsf@bsb.me.uk |
| Xref | csiph.com comp.lang.javascript:34406 |
Show key headers only | View raw
bit-naughty@hotmail.com writes: > Suppose I have 2 buttons on my website - "apples" and "onions". When > someone clicks either, I want it to "glow" - ie, say change colour to > orange or something,.... ie. it is *selected*. And then the user will > click a Submit button, so that the script on the server side knows > which one was selected - apples or onions. How do I code this entire > thing, please? I have seen this on websites, where, not just the > colour of the buttons changed, the selected button even got a little > "tick mark" on it - I'm very curious to know how this was done. You don't need client-side scripting for this. Here is a very simple example using CSS: http://bsb.me.uk/testing/button.html and another where you can see it in action with a submit button: http://bsb.me.uk/testing/button.php The idea is that you style the label of a checkbox. I've chosen to hide the checkbox, but you don't have to do that. You can view the PHP source at http://bsb.me.uk/testing/button-php.txt -- Ben.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Buttons glowing on being selected bit-naughty@hotmail.com - 2017-12-15 04:25 -0800
Re: Buttons glowing on being selected "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-12-15 18:13 +0100
Re: Buttons glowing on being selected Philip Herlihy <thiswillbounceback@you.com> - 2017-12-18 12:27 +0000
Re: Buttons glowing on being selected Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-18 17:12 +0000
Re: Buttons glowing on being selected bit-naughty@hotmail.com - 2017-12-19 12:03 -0800
Re: Buttons glowing on being selected Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-12-19 23:35 +0000
Re: Buttons glowing on being selected Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-12-20 01:29 +0100
Re: Buttons glowing on being selected bit-naughty@hotmail.com - 2017-12-19 11:52 -0800
Re: Buttons glowing on being selected John G Harris <niam@jghnorth.org.uk.invalid> - 2017-12-19 20:14 +0000
Re: Buttons glowing on being selected "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-12-19 21:17 +0100
Re: Buttons glowing on being selected Julio Di Egidio <julio@diegidio.name> - 2017-12-21 11:10 -0800
csiph-web