VBScript works, equivalent JScript doesn't - what am I missing?

This script is for DesktopX Edit object, basically it's suppose to respond to pressing Enter.
For some reason when I run this VB script, it works
Sub Control_OnKeyPress(Key)
' if enter key is pressed
If Key = 13 Then
Control.Text = "1234"
End If
End Sub


However, when I try to do the same thing with JScript, there's no response
function Control_OnKeyPress(Key)
{
if( Key == 13 )
{
Control.Text = "1234";
}
}


What am I doing wrong? Is the name of the function different for JScript?
2,199 views 5 replies
Reply #1 Top
hm... odd. I tried the code you had there and I get the same results. I also tried a pushbutton control and same thing happends there. The OnClick even triggers in VB but not JS. I think this might be a bug in the DX script implementation. I think you should report this to the developer.
Reply #2 Top
Hmmm, I posted this on DesktopX->Development->Bug Reports (or something like that) forums, is there any other way to report bugs or is that it?
Reply #4 Top
The newsgroups might work too.
Reply #5 Top
The newsgroups might work too.

True, but the keyword is "might". This bug is a showstopper one and it's probably best to be sure.