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:
I am currently receiving the following error in some versions of IE:
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?
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?
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.
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:
- Is it the same file?
- 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.
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?
That's a good question, one for which further investigation may turn up a few useful answers.