trap keypress and keydown event in asp.net mobile form

Discussion in 'ASP .Net Mobile' started by jaspal singh, Nov 24, 2006.

  1. jaspal singh

    jaspal singh Guest

    How can i trap the KayPress and Keydown event using asp.net mobile form.
    for example
    <script language="javascript" for="window" event="onload()">
    document.getElementById("TEST").focus();
    function keypress(e)
    {
    alert(window.event.keycode)
    }

    function keydown(e)
    {
    alert(window.event.keycode)
    }
    document.onkeypress = keypress
    document.onkeydown=keydown
    </script>

    the above code is working fine on IE6.0 but not working on pocket IE 2.0

    Thanks
    Jasapl Singh
    jaspal singh, Nov 24, 2006
    #1
    1. Advertising

  2. jaspal singh

    Jay Guest

    I think some Pocket PC won't work this options. Can you please try with
    latest one.

    "jaspal singh" wrote:

    > How can i trap the KayPress and Keydown event using asp.net mobile form.
    > for example
    > <script language="javascript" for="window" event="onload()">
    > document.getElementById("TEST").focus();
    > function keypress(e)
    > {
    > alert(window.event.keycode)
    > }
    >
    > function keydown(e)
    > {
    > alert(window.event.keycode)
    > }
    > document.onkeypress = keypress
    > document.onkeydown=keydown
    > </script>
    >
    > the above code is working fine on IE6.0 but not working on pocket IE 2.0
    >
    > Thanks
    > Jasapl Singh
    Jay, Nov 27, 2006
    #2
    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. mee-shell

    Keydown Event and Focus Problem

    mee-shell, Oct 23, 2004, in forum: Python
    Replies:
    0
    Views:
    556
    mee-shell
    Oct 23, 2004
  2. chen selina
    Replies:
    0
    Views:
    1,232
    chen selina
    Jul 13, 2010
  3. Chris Calhoun
    Replies:
    1
    Views:
    260
    Jim Cheshire [MSFT]
    Oct 10, 2003
  4. Jens Butm

    KeyDown/KeyPress is not working... ??

    Jens Butm, Oct 19, 2007, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    848
    Jens Butm
    Oct 19, 2007
  5. George Hester

    Capture a keydown or keypress?

    George Hester, Dec 29, 2003, in forum: Javascript
    Replies:
    8
    Views:
    245
    Evertjan.
    Jan 2, 2004
Loading...

Share This Page