Results 1 to 4 of 4

Thread: "Access is Denied" Error when I try to execute JavaScript

  1. #1
    Join Date
    May 2012

    "Access is Denied" Error when I try to execute JavaScript

    Hello JavaScript Expert.

    I created an HTML file with embedded JavaScript that interacts with the Google Maps API. Everything works but on certain machines I receive an "Access is Denied" error when I try to execute the JavaScript code from MS Access VBA.

    Call Forms("frmMap").WebBrowser.Document.parentWindow.execScript("initialize()", "", "JavaScript")

    I cannot isolate why this error is thrown on some machines and why everything works on others. The machines only have Internet Explorer.

    Yesterday I had access to a machine that generated the error with the below specs:

    Internet Explorer 11
    Security settings at Medium-Low
    Windows 7 64 Bit SP 1
    Windows Updates set to automatic.

    The same issue does occur on another machine with IE 8 running Windows 7.

    I cannot reproduce the error on my machine. I tried playing with many Internet Explorer settings but I just cannot reproduce the error and I am out of ideas as to what could be causing this error on some machine but not others.

    I appreciate any suggestions or advice.

    Thank you

  2. #2
    Join Date
    Mar 2007
    I would ask in the forum offering VB support.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  3. #3
    Join Date
    May 2012
    Thank you. I didn't know there was a section for VB. Just went straight to JavaScript. Should I wait for the moderator to move it to the VB section or start a new thread? I am fairly new to this forum.


  4. #4
    Join Date
    May 2012
    Below is another user experiencing the same issue.


    The suggested workaround is to use IE.navigate "javascript:initialize();" instead of execScript("initialize()", "", "JavaScript"). Any thoughts? Since I can't reproduce the error on my machine I would have to try on the user's machine which is difficult because they are a manager. Before I bother the manager I wanted to know this community's opinion if it will work?

    Thank you

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center