Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #30980 > unrolled thread
| Started by | bit-naughty@hotmail.com |
|---|---|
| First post | 2016-07-27 00:41 -0700 |
| Last post | 2016-07-27 11:59 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.javascript
Button click ONLY - coding (newbie question) bit-naughty@hotmail.com - 2016-07-27 00:41 -0700
Re: Button click ONLY - coding (newbie question) JJ <jj4public@vfemail.net> - 2016-07-27 17:34 +0700
Re: Button click ONLY - coding (newbie question) Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-27 11:59 +0100
| From | bit-naughty@hotmail.com |
|---|---|
| Date | 2016-07-27 00:41 -0700 |
| Subject | Button click ONLY - coding (newbie question) |
| Message-ID | <edbaa51a-8533-4cf6-ba9a-8535a3a37f71@googlegroups.com> |
I have a button on my webpage (a picture), which I want to "glow" when the button is clicked. So the sequence of events is like this: mouseover: <do nothing> mouseclick: <show the "glowed" picture, ie. it has to be got from the server and shown - IMMEDIATELY!> mouserelease: <go back to unglowed picture> ...and then, go to the new page (whatever the link points to). I'm a little confused how to code all of this..... can anyone help? :) Thanks.
[toc] | [next] | [standalone]
| From | JJ <jj4public@vfemail.net> |
|---|---|
| Date | 2016-07-27 17:34 +0700 |
| Message-ID | <67nu1epuayz$.j72skyaxh2sd.dlg@40tude.net> |
| In reply to | #30980 |
On Wed, 27 Jul 2016 00:41:18 -0700 (PDT), bit-naughty@hotmail.com wrote: > I have a button on my webpage (a picture), which I want to "glow" when the button is clicked. > So the sequence of events is like this: > > mouseover: <do nothing> > mouseclick: <show the "glowed" picture, ie. it has to be got from the server and shown - IMMEDIATELY!> > mouserelease: <go back to unglowed picture> > ....and then, go to the new page (whatever the link points to). > > I'm a little confused how to code all of this..... can anyone help? :) > > Thanks. There are no `mouseclick` and `mouserelease` events. You'll need to handle `click`, `mousedown`, and `mouseup` events. Glowed image on left-button `mousedown`, normal image on left-button `mouseup`, and do the action on `click`.
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2016-07-27 11:59 +0100 |
| Message-ID | <87mvl3fisa.fsf@bsb.me.uk> |
| In reply to | #30980 |
bit-naughty@hotmail.com writes: > I have a button on my webpage (a picture), which I want to "glow" when > the button is clicked. > So the sequence of events is like this: > > mouseover: <do nothing> > mouseclick: <show the "glowed" picture, ie. it has to be got from the > server and shown - IMMEDIATELY!> > mouserelease: <go back to unglowed picture> > ...and then, go to the new page (whatever the link points to). > > I'm a little confused how to code all of this..... can anyone help? :) You may be able to do this to your satisfaction using a simple CSS rule. Display the glowing version when the link state is active. -- Ben.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web