LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OnKeyUp event does not fire in WebBrowser control

Hello out there.
 
I am using LV 8.5 and I am having a problem getting the Javascript OnKeyUp event to fire in a .NET WebBrowser control.  I am using the 2.0.0.0 .NET Framework.  Loading the same page directly into IE or into the same .NET control in C# does not exhibit this problem.  This problem is documented, see http://support.microsoft.com/kb/322173, as fixed by Microsoft in the 1.0.3705.271 .NET Framework.  I have .NET versions 1.1, 2.0 and 3.0 installed on my laptop.  The .NET WebBrowser control is loaded from System.Windows.Forms(2.0.0.0).
 
I do not have the flexibility to try a newer version of the .NET framework as I am attempting to integrate browser code that we have developed into our LV application.  Has anyone run into or know of any Javascript limitations in NIs .NET integration?
 
BTW, I also tried this via the ActiveX WebBrowser with the same result.  Is ActiveX actually using the same .NET code?
 
Thanks,
Chris Roth
0 Kudos
Message 1 of 8
(5,861 Views)
What do you expect to get from this event? Could it be that it fires when
you activate a field in the web page, and release a keyboard key? I make
this mistake every time in LV (I think KeyUp is my mouse key, but I should
use MouseUp instead).

Just a thought.

Wiebe.


0 Kudos
Message 2 of 8
(5,858 Views)

Wiebe,

You are going down the road of workarounds, which may be where I am headed as well.  Outside of of LabVIEW, this Javascript works as we want it to, so the Javascipt is fine and the event we are using is proper.

I am trying to find out if anyone else has had this problem and why the Javascript does not work in LabVIEW.  Also, what other Javascript surprises am I going to run into using the .NET WebBrowser in LV?

Chris

0 Kudos
Message 3 of 8
(5,847 Views)
I just tought you might be mistaken (confuse mouseup and keyup) that's all.
Clicking the mouse, waiting for keyup event to happen.

Regards,

Wiebe.


0 Kudos
Message 4 of 8
(5,842 Views)
Hi Chris,
 
Have you seen this document?: How Do I Integrate Java with National Instruments Software Products? It talks about needing the JNI to interface between NI products and Java.
 
Let us know if this doesn't work for what you are doing.
Regards,

Hillary E
National Instruments
0 Kudos
Message 5 of 8
(5,829 Views)
Hillary,
 
Thanks, but "java" and "javscript" are two different programming languages.  "Java" is a programming language like C, but "javascript" is a programming language only used within a web page to enable client side functionality in a web page.
 
Thanks for this idea, but I have a problem with "javascript".
 
Thanks,
Chris
0 Kudos
Message 6 of 8
(5,825 Views)

Chris,

I have found little information on using JavaScript with LabVIEW and nothing that sounds similar to what you are doing in our resources. However, there is information on this topic on LAVA. Particularly this page in their code repository: Calling External Code: Javascript 

There is also a discussion board specifically for Javascript.

Regards,

Hillary E
National Instruments
0 Kudos
Message 7 of 8
(5,802 Views)

Looks like this may be a bug.  I posted the issue to NI Tech Support and they are looking into it further (Reference#7182380).

Chris

0 Kudos
Message 8 of 8
(5,788 Views)