SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Evangelist silversurfer5150's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Access is denied error

    Hey there,

    Am currently using the MathJax library for an E-learning software project. The software features a container for a player which is loaded dynamically and contains a number of different templates.

    I am using mathjax inside of the player have linked the library dynamically (in the head) using the link below:

    Code:
    <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=default"></script>
    I am currently receiving the following error in some versions of IE:
    Line: 46
    Char: 495
    Error: Access is denied
    URL : http://cdn.mathjax.org/mathjax/latest/MathJax.js

    The error only occurs in IE7 and 8 and any MML on these browsers fails to
    render. On all other browsers it works fine.

    I suspect that this has something do to with the way in which I load content dynamically in the player and maybe mathjax is loading and attempting to perform actions with reference to parts of the DOM which do not exist yet.

    Do any of you wizards have alternatives for me? If so do you have examples?

    thanks

    Silversurfer
    "Persistence is the path to perfection"

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,716
    Mentioned
    103 Post(s)
    Tagged
    4 Thread(s)
    It seems that the error doesn't occur for me when the script is loaded, which implies that it may be related to how it is being used.

    Do you have a test html that can help us to experience the problem?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Evangelist silversurfer5150's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question

    Hey there,

    Thanks for your help

    I am testing using apache so firstly this is not a cross site issue. I am expecting you to have no problems viewing the page correctly in your version of IE. This access is denied error only occurs on certain machines, in our office, only two out of ten machines.

    Honestly never seen anything like it. I can have two identical versions of IE7/8 on different machines and one will have this error and the other won't.

    I have also added both the localhost and the mathjax cdn site to my IE trusted sites and enabled allow access to all domains in the options. This is apparently the standard way to solve the access is denied error but does not work for me.

    I have attached the file itself which is a good example as it actually shows all of the initialization stages of the library and outputs them to the screen.

    I have also attached two pictures, the first the way the page renders in IE7 and the second, the way it renders correctly.

    I have raised the issue to my boss and now i wish i hadn't cos he is worried about our release and is putting pressure on me to solve it! Please let me know if you have any ideas.

    thanks

    Silversurfer
    Attached Images Attached Images
    Attached Files Attached Files
    "Persistence is the path to perfection"

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,716
    Mentioned
    103 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by silversurfer5150 View Post
    I have raised the issue to my boss and now i wish i hadn't cos he is worried about our release and is putting pressure on me to solve it! Please let me know if you have any ideas.
    The most immediate question that comes to my mind is that the script file is 30 lines long, but the error occurs on line 46.

    So two questions that immediately come to mind are:
    1. Is it the same file?
    2. and, is the file being misinterpreted in some way?


    Can you test on an unpacked version of the script? That will help to confirm whether the problem is due to the format of the file, or some part of the actual script.

    If you still get the error with the script, add in line breaks to confirm you have the right location for the error. Then you can focus on the content of that part of the script, to determine why the error is being thrown.

    For now though, my money is on an interpretation issue relating to the file as a whole, which is something that the good people in the Apache Configuration forum might be able to help with.

    If it's not due to the file format, you may want to look in to cross-domain issues instead, due to the "access is denied" message.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #5
    SitePoint Evangelist silversurfer5150's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Paul,

    No sorry its not the same file, its a test file which comes with the mathjax library. Our project is too big with too many dependent files to attach. The behavior is the same when this file is run in certain IE7/9.

    I have downloaded an unpacked mathjax, this does in fact make a difference but why when so many other browsers facilitate the dynamic linking correctly?
    "Persistence is the path to perfection"

  6. #6
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,716
    Mentioned
    103 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by silversurfer5150 View Post
    I have downloaded an unpacked mathjax, this does in fact make a difference but why when so many other browsers facilitate the dynamic linking correctly?
    That's a good question, one for which further investigation may turn up a few useful answers.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

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