OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Basher on August 11, 2020, 11:41:24 PM

Title: HTML
Post by: Basher on August 11, 2020, 11:41:24 PM
hello friends

I have been wrote a HTML code including scripts codes
its run fine at chrome and there is no errors and have an excellent output . 
when i open the html inside HTML opendcl  i have an errors about my script code .
do i miss something , any help .

thanx
basher
Title: Re: HTML
Post by: honkinberry on September 01, 2020, 08:28:00 AM
Basher,

You will want to check your code in Internet Explorer, not Chrome.  The webview control utilizes IE.
We find the script errors are most commonly due to IE needing to updated, or just needing to be initialized.

--J
Title: Re: HTML
Post by: DW on January 31, 2023, 04:25:03 PM
Quote from: Basher on August 11, 2020, 11:41:24 PM
its run fine at chrome and there is no errors and have an excellent output . 
when i open the html inside HTML opendcl  i have an errors about my script code .

For any future search on this topic...
I'd been struggling to find the reason for HTML script errors and couldn't figure out why they were not seen in BricsCAD but were prolific in AutoCAD.

It turns out that during a BricsCAD installation, an Internet Explorer registry entry is set which specifies the MSIE User-Agent BricsCAD will use.  By default, there is no corresponding entry for AutoCAD. 

The key can be checked and set with the following code:
(if (not (vl-registry-read "HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION" (strcat (getvar "program") ".exe")))
      (vl-registry-write "HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION" (strcat (getvar "program") ".exe") 11001)
  )


Where the 11001 DWord value will force IE11 emulation instead of an older IE emulation.

More info can be found in this article: https://www.devhut.net/webbrowser-activex-control-google-maps-invalid-character-scripting-error/
Title: Re: HTML
Post by: Danner on February 02, 2023, 06:23:08 AM
Hi DW,
I'm not the OP, but have encountered this issue aswell.  That is tremendous information.
Many thanks indeed for posting the solution..
Cheers
Title: Re: HTML
Post by: Fred Tomke on March 01, 2023, 12:16:39 PM
Hi, DW, many thanks for forwarding!
Regards, Fred