Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: onClick

  1. #1
    Regular Coder
    Join Date
    Oct 2002
    Posts
    144
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Unhappy onClick

    Is it possible with the onClick to simulate key strokes?

    The Dingbat:

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    For what purpose?

  • #3
    Regular Coder
    Join Date
    Oct 2002
    Posts
    144
    Thanks
    12
    Thanked 0 Times in 0 Posts
    What I really looking for is this.

    Any key stroke = to the enter key, or onClick anywhere on screen = to enter key.

    Is it possible??????????

    Dingbat

  • #4
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Some of the keys (F1, F5, F11, Esc... etc.) have defined roles within the browser's economy and you can not change their meaning, as far as I know.

    Regarding Enter key... Well, Enter key may activate a submit button (or a focused button) but, if there is no such a thing on the page, (or you had not focused the Address bar) Enter will do nothing, so even if you can simulate the Enter key, that will do nothing either...

    I think you must explain what kind of action you need, than you simply use onkeyup or onkeydown event handlers to fire that action or function or whichever...

    <body onkeyup ="alert('you pressed a key')">
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •