captue enter button

Discussion in 'ASP General' started by DaveF, Aug 19, 2004.

  1. DaveF

    DaveF Guest

    Is it possible to capture the enter button and run a javascript function?

    --


    David
     
    DaveF, Aug 19, 2004
    #1
    1. Advertising

  2. DaveF

    Ray at Guest

    This is an ASP group so it only really deals with server-side coding, not
    client-side events.

    But, yes, you can. Key code 13 is enter, iIrc.

    Ray at work

    "DaveF" <> wrote in message
    news:...
    > Is it possible to capture the enter button and run a javascript function?
    >
    > --
    >
    >
    > David
    >
    >
     
    Ray at, Aug 19, 2004
    #2
    1. Advertising

  3. DaveF

    DaveF Guest

    I am doing the following. It works in a single page, but when I try to run
    it in a frameset, it does not. ?????


    <Script language="JavaScript">
    function checkEnterKey(event){
    if (event != null) {
    code = event.keyCode
    alert(code)
    }
    }
    </script>
    <body onkeypress="testme(event)";>

    --


    David Fetrow
    Helixpoint LLC.
    http://www.helixpoint.com

    "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
    message news:%...
    > This is an ASP group so it only really deals with server-side coding, not
    > client-side events.
    >
    > But, yes, you can. Key code 13 is enter, iIrc.
    >
    > Ray at work
    >
    > "DaveF" <> wrote in message
    > news:...
    > > Is it possible to capture the enter button and run a javascript

    function?
    > >
    > > --
    > >
    > >
    > > David
    > >
    > >

    >
    >
     
    DaveF, Aug 19, 2004
    #3
  4. DaveF

    Ray at Guest

    Try inquiring in either a client-side scripting group, i.e.
    m.p.scripting.jscript, or a browser group.

    Ray at work

    "DaveF" <> wrote in message
    news:...
    >I am doing the following. It works in a single page, but when I try to run
    > it in a frameset, it does not. ?????
    >
    >
    > <Script language="JavaScript">
    > function checkEnterKey(event){
    > if (event != null) {
    > code = event.keyCode
    > alert(code)
    > }
    > }
    > </script>
    > <body onkeypress="testme(event)";>
    >
    > --
    >
    >
    > David Fetrow
    > Helixpoint LLC.
    > http://www.helixpoint.com
    >
    > "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
    > message news:%...
    >> This is an ASP group so it only really deals with server-side coding, not
    >> client-side events.
    >>
    >> But, yes, you can. Key code 13 is enter, iIrc.
    >>
    >> Ray at work
    >>
    >> "DaveF" <> wrote in message
    >> news:...
    >> > Is it possible to capture the enter button and run a javascript

    > function?
    >> >
    >> > --
    >> >
    >> >
    >> > David
    >> >
    >> >

    >>
    >>

    >
    >
     
    Ray at, Aug 19, 2004
    #4
    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. TS
    Replies:
    5
    Views:
    14,491
    Jeffrey Tan[MSFT]
    Nov 29, 2005
  2. BrianDH

    Enter Key H*ll, control enter key submit button

    BrianDH, Jan 12, 2005, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    400
    Anders Matthiessen
    Jan 12, 2005
  3. Matt
    Replies:
    1
    Views:
    509
    Michael Winter
    Mar 6, 2004
  4. HopfZ
    Replies:
    0
    Views:
    576
    HopfZ
    Aug 28, 2006
  5. jimmy

    Captue window.close() event

    jimmy, Apr 2, 2007, in forum: Javascript
    Replies:
    2
    Views:
    104
    terriblecow
    Apr 12, 2007
Loading...

Share This Page