Results 1 to 4 of 4

Thread: ASCII Code

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2001
    Posts
    150

    ASCII Code

    Hi all,

    i'me trying to produce a program that will know when i press "ENTER" in JavaScript.

    Does somebody know how i can get the ASCII code of a keyin JavaScript

    Thanxs

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Oct 2001
    Posts
    150
    Just a little question Scoutt,

    when you received the paramater in your function, what exactly are you receiving. In other words, what are you sending

    Thanks for your time

  3. #3
    scoutt
    Guest
    what is the key sending? well I'm sure it sends the samething all the time, Binary code. so then windows interprets the binary into a key code or ascii code.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Oct 2001
    Posts
    150
    I've tried those 2 lines of coding :

    <code>
    document.onkeydown = getKeycode;
    If (blnNN4) document.captureEvents(Event.KEYDOWN);
    </code>

    and it makes an error....

    what i don't understand is that your function is receiving a parameter ("e") where are you sending that parameter?

    If i do an alert(document.captureEvents(Event.KEYDOWN));

    it's always "Undefined"

    I have no problem with the coding in IE but Netscape just won't work.

    I think that i'me probably missing something

    Thanxs for your help

    See ya

Posting Permissions

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



Click Here to Expand Forum to Full Width