Results 1 to 4 of 4


  1. #1
    Sven Cipido Guest


    Hello,<BR><BR>Is their a way that I can detect if the "enter" key is pressed on a page using VBscript. If so, can I call then another routine ?<BR><BR>Kind Regards<BR>Sven Cipido

  2. #2
    Join Date
    Dec 1969

    Default RE:

    If is helps this is will give you the keycode in Javascript:<BR><BR>&#060;script&#062;<BR>function document.onkeypress()<BR>{<BR> alert(event.keyCode);<BR>}<BR>&#060;/script&#062;

  3. #3
    Sven Cipido Guest

    Default Keypress

    Hi,<BR><BR>This gives me indeed the code. But how can I check the code when the key is pressed.<BR><BR>Thanx<BR><BR>BTW : Sorry for the wrong title

  4. #4
    Eddie Campbell Guest

    Default RE: Keypress

    This will call the ShowAlert() function if the user presses Enter (keyCode 13)<BR><BR>&#060;script language="JavaScript"&#062; <BR>function document.onkeypress() <BR>{ <BR>if(event.keyCode==13){<BR> ShowALert();<BR>}else{<BR> alert("Did NOT press Enter");<BR>} <BR>} <BR>function ShowAlert(){<BR>alert("Pressed Enter");<BR>}<BR>&#060;/script&#062;

Posting Permissions

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