locked
window.event.keyCode RRS feed

  • Question

  • User-1282880130 posted

    Below is a vbscript sub

    sub

    text_release_onkeypress()

     if window.event.keyCode=32 then window.event.keyCode=0 msgbox "Spaces not allowed"

    end if

    end sub

     

    What is the meaning of if window.event.keyCode=32 then window.event.keyCode=0?..why it is used?..thanks in advance

    Wednesday, May 11, 2011 3:24 AM

Answers

  • User581622694 posted

    Hi ,

    KeyCode = 0 Is for KeyDown .

     

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 11, 2011 7:49 AM

All replies

  • User-1757793930 posted

    simply checks that key was pressed and if it is equal to 32 (space key char) it resets to 0 (although i have no idea what 0 is, cant find its reference).

     

    Wednesday, May 11, 2011 4:22 AM
  • User-1282880130 posted

    ACtually, i want to know, what is windows.event.key.code=0?

    Wednesday, May 11, 2011 7:28 AM
  • User581622694 posted

    Hi ,

    KeyCode = 0 Is for KeyDown .

     

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 11, 2011 7:49 AM