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 3 of 3
  1. #1
    New Coder
    Join Date
    Oct 2009
    Posts
    17
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Exclamation Problems with onkeyup for buttons

    Hi, I currently have some buttons representing letters and a textbox. When a button is clicked, its value is copied into the text box. I have an onkeyup event which means that every time a button is clicked, a function is called which searches some arrays using the current text box value.
    However, the problem I am currently having is that the onkeyup event which calls the function works if I type the value in using my computer keyboard, but not when using the buttons (even though the buttons enter values into the textbox).

    Does anyone have any suggestions on how I can make it so that when I press a button, the onkeyup event triggers and the function is called?

    Thanks.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,895
    Thanks
    202
    Thanked 2,528 Times in 2,506 Posts
    <input type = "button" onclick =

    All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

  • Users who have thanked Philip M for this post:

    mike2325 (12-08-2009)

  • #3
    New Coder
    Join Date
    Oct 2009
    Posts
    17
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Thanks, although I already managed to sort it myself, cheers anyway.


  •  

    Posting Permissions

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