49 users online (0 members and 49 guests)  


  Results 1 to 4 of 4

Related

  1. Replies: 1
  2. How to add Functionality for EXIT button in HTML    Forum: Website Scripts Forum
    Replies: 1
  3. Replies: 5
  4. Replies: 3
  1. #1
    kveerendrareddy's Avatar
    New User

    Status
    Offline
    Join Date
    Aug 2007
    Posts
    11

    Plz help me in writing code to assign functionality to any function keys

    How to assign function(F1,F2...) keys or ctrl, shift keys for any
    functionality?
    For eg: If we click F1 while the cursor is in any text box, it should be
    able to retrieve some data from database and it should display the
    retrevied data in the dropdown form in the text box, so that we can
    select one value among them....(JSP/Servlets).

  2. #2
    Sridhar1970's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2007
    Posts
    1

    Re: Plz help me in writing code to assign functionality to any function keys

    Try this - if f1 is pressed your code should work
    <script language="javascript">
    window.onhelp=function()
    {
    // put your code here
    }
    </script>

  3. #3
    dcuerrier's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2007
    Location
    Brossard, Quebec, Canada
    Posts
    13

    Re: Plz help me in writing code to assign functionality to any function keys

    The code is good, but dont forget to finish your function with: return false;
    This way the help windows will not show after your code execution.

  4. #4
    dcuerrier's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2007
    Location
    Brossard, Quebec, Canada
    Posts
    13

    Re: Plz help me in writing code to assign functionality to any function keys

    FYI
    Also, you may use accesskey="a" in your input tag to use alt-a to focus in a input, or to click a button.



Tags for this Thread