Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > JavaScript > Re: Map button ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 11 Topic 35558 of 37168
Post > Topic >>

Re: Map button on form to key on keyboard

by "Evertjan." <exjxw.hannivoort@[EMAIL PROTECTED] > May 10, 2008 at 06:09 PM

MikeB wrote on 10 mei 2008 in comp.lang.javascript:

> I have a simple form that I'm using to learn something about HTML and
> JavaScript.
> 
> Can I associate a button on the form with a keyboard key so that when
> the user presses the keyboard key the form thinks the button has been
> clicked?

Yes you can, but not cross browser compatible.

> Background:
> I'm learning HTML and JavaScript. 

Do HTML first, Javascript is another piece of cake.

> We did a simple JavaScript that had
> a button that would add the numbers in two input fields.
 
Who is "we", is this a school assignment?

> I then thought it would be nice to change the form (and the
> JavaScript) to make a "real" calculator.http://fmechess.org/demo/
> calculator.html

Better come with som code that jou are imagining.
 
> What I would like to do is to make the calculator sensitive to normal
> presses of the keyboard keys, so that instead of clicking on the
> buttons to enter a calcualtion, the user can simply type on the
> keyboard. Is this possible?

Yes, see above.
 
> Thanks.
> 
> PS. I hope this is the right ng to ask in, I got "booted" out of the
> HTML ng for asking in there.  :)

Are you sure it was not because you are not showing you did do any 
reseach yourself before you asked? 

Look for HTML 'accesskey' on Google.

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 




 11 Posts in Topic:
Map button on form to key on keyboard
MikeB <MPBrede@[EMAIL   2008-05-10 09:35:54 
Re: Map button on form to key on keyboard
"Evertjan." <  2008-05-10 18:09:38 
Re: Map button on form to key on keyboard
MikeB <MPBrede@[EMAIL   2008-05-10 13:37:45 
Re: Map button on form to key on keyboard
"Evertjan." <  2008-05-11 10:06:30 
Re: Map button on form to key on keyboard
Matthias Watermann <li  2008-05-11 14:30:52 
Re: Map button on form to key on keyboard
"Evertjan." <  2008-05-11 14:39:38 
Re: Map button on form to key on keyboard
Matthias Watermann <li  2008-05-11 18:28:36 
Re: Map button on form to key on keyboard
Thomas 'PointedEars' Lahn  2008-05-10 22:56:53 
Re: Map button on form to key on keyboard
Steve Swift <Steve.J.S  2008-05-11 07:27:56 
Re: Map button on form to key on keyboard
MikeB <MPBrede@[EMAIL   2008-05-10 14:20:48 
Re: Map button on form to key on keyboard
Mervyn Carter <Mervyn@  2008-05-11 09:35:52 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 14 10:06:35 CDT 2008.