Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Undefined value in window.event.keycode
Message
From
05/10/2001 11:58:30
 
 
To
05/10/2001 11:56:28
General information
Forum:
Internet
Category:
HTML
Miscellaneous
Thread ID:
00564833
Message ID:
00564843
Views:
17
>>From our previous thread, where I was using that code:
>>
>>
>>function FormLogin()
>>{
>>   if (window.event.keycode == 32)
>>   {
>>      javascript:document.Login.submit()
>>      window.event.keyCode = 0
>>      event.returnValue = false
>>   }
>>}
>>
>>
>>In regards to that, I had to adjust the = to be ==. The single equal is an assignment.
>>
>>I also find that now everytime I go in this function, I can't do alert(window.event.keycode). It is always undefined. I put the alert just before the if. Any idea?
>
>Right, I posted the function without checking the syntax from the VBScript conversion. Yes should have been == and also I think your other problem is the case.
>
>window.event.keycode should be window.event.keyCode. Aren't case-sensitive languages great?

I found that I can get its value by dropping it into a variable. I can then from the variable use it in the alert.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform