File Upload - Change key code for ENTER key on Browse Button

Discussion in 'ASP .Net' started by bsm, May 10, 2007.

  1. bsm

    bsm Guest

    Hi,

    I have File Upload control in my form. When I click Enter key, it
    triggers "Submit" button event. So I wrote onkeydown function as
    follows:

    if (window.event.keycode == 13)
    {
    return false;
    }.

    hence "Submit" button didn't fire.

    But I want to assign Spacebar keycode as follows (so that it will open
    file upload window)

    if (window.event.keycode == 13) window.event.keycode=32. But this is
    not working.

    Can anyone plz help me.
     
    bsm, May 10, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. BrianDH

    Enter Key H*ll, control enter key submit button

    BrianDH, Jan 12, 2005, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    446
    Anders Matthiessen
    Jan 12, 2005
  2. Matt
    Replies:
    1
    Views:
    565
    Michael Winter
    Mar 6, 2004
  3. bsm
    Replies:
    3
    Views:
    313
  4. Replies:
    0
    Views:
    244
  5. Replies:
    8
    Views:
    510
Loading...

Share This Page