I have Internet Explorer 9 installed and some functions like "JSON.parse()" or "Object.keys()" simply don't work with the ActiveX control.
Any suggestions?
Does anybody know why some javascript functions don't work with ActiveX control? Topic is solved
Does anybody know why some javascript functions don't work with ActiveX control?
Last edited by gregster on 24 Jul 2021, 19:06, edited 1 time in total.
Reason: Topic moved from 'Forum Issues'.
Reason: Topic moved from 'Forum Issues'.
Re: Does anybody know why some javascript functions don't work with ActiveX control?
Internet Explorer 9? Are you using Vista?
WebBrowser controls operate in IE7-compatibility mode by default, although I'm not sure how that affects the JavaScript environment. There are at least two ways around it:
WebBrowser controls operate in IE7-compatibility mode by default, although I'm not sure how that affects the JavaScript environment. There are at least two ways around it:
- Include <meta http-equiv='X-UA-Compatible' content='IE=edge'> in the document.
- Use a registry fix (search the forum for FixIE).
Re: Does anybody know why some javascript functions don't work with ActiveX control? Topic is solved
Work with json object without eval You can only from IE8.
If You want to work with them in earlier IE versions You can do it with this trick:
If You want to work with them in earlier IE versions You can do it with this trick:
Code: Select all
doc := ComObjCreate("htmlfile")
doc.write("<meta http-equiv=""X-UA-Compatible"" content=""IE=5"">")
msgbox % Doc.documentMode
JS := doc.parentWindow
JS.execScript(" ") ; Initializing the JavaScript interpreter for IE < IE9
msgbox, % JS.eval("({""key"":""value""})").key