LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SCRIPT ERROR OCCUR WHILE OPENING HTML FILE

Solved!
Go to solution

Hii, 

I am opening html file in labview but facing some script error related issue, where properties and design of that html file is changing.

If same html file open in  Internet explorer or chrome, (Web-page) it is opening as expected, but same html file when call in Labview using

"active-X"  web browser, Web-page properties and design are changing.

I have tried all options related to active-x web browser properties

P Vidya sankar,

0 Kudos
Message 1 of 6
(3,059 Views)

Can you share the code along with html file??


CLD Using LabVIEW since 2013
0 Kudos
Message 2 of 6
(3,043 Views)

Hello karthik,

 

Thanks for your reply.

 

We can't share the HTML document due to some security issues. But i can share the Script error issues and I am attaching the same here. Please check and help me. 

 

P Vidya sankar,

Download All
0 Kudos
Message 3 of 6
(3,035 Views)
Solution
Accepted by vidya1825

Hi P Vidya sankar,

 

From the screenshots it looks like the browser that the version of Internet Explorer loaded by the IWebBrowser2 control does not support the method addEventListener or the method getElementsByClassName.

 

Using the tool caniuse.com we can see that addEventListener and getElementsByClassName are supported in Internet Explorer 9 or greater.

 

The third party blog Web Browser Control & Specifying the IE Version describes ways to configure a newer version of Internet Explorer when using the IWebBrowser2 control. One approach it describes is adding the following tag to the head of your html document:

 

 

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

 

 

Which looks like the following in a full html document (from the third party blog):

 

 

<!DOCTYPE html> 
<html> 
  <head> 
    <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 
    ... other headers
  </head>
  <body>
    ... content
  </body>
</html>

 

 

With the header added you should also verify that you have a recent version of Internet Explorer available on your system. The third party blog goes into more details.


Milan
Message 4 of 6
(2,977 Views)

Hello MIlan,

 

Thanks for your help.

 

I changed the IE version in Code. Now there is no issues.

P Vidya sankar,

0 Kudos
Message 5 of 6
(2,953 Views)

Hi P Vidya sankar,

 

I am also facing the same problem. 

whereas  i have no access to the html code. Whenever i call the url i get the script error.  

Could you please tell me the procedure to change the IE version from the labview 2019.

 

Thanks and regards

Avinash

0 Kudos
Message 6 of 6
(2,516 Views)