This is a very urgent problem, and I will be forever indebted to anyone who can give some idea.
I am going to deploy a widget (called "ISM") on a third-party site. This site uses the JavaScript property document.domain to ease cross-domain restrictions (for example, setting document.domain to "a.example.com" and "b.example.com" on both "example.com" so that they can access each other DOM).
This causes problems with my script in Internet Explorer due to the way I create an <iframe> which is used to display the contents of my HTML widget. In Internet Explorer, use document.domain on the page, and then create an <iframe> with JavaScript, will make you immediately "block" from <iframe> - i.e. you can create it, but it is not created in the correct document.domain, so you cannot access its DOM due to security restrictions. This is not a problem in any other browser.
To find out what I'm talking about, download this page in IE:
http://troy.onespot.com/static/3263/stage1.html
You should see a JavaScript error: "Access denied."
To get around this, I set the dynamically created <iframe> src attribute to load a static HTML file hosted in the same domain (another subobject) and set its document.domain property to the appropriate value:
http://troy.onespot.com/static/3263/stage2.html
This concerns the security issue and allows me to write the document that I originally wanted to write in the <iframe>:
http://troy.onespot.com/static/3263/stage3.html
With this document, my widget does some polling on our server to get some HTML content that I want to embed in another <iframe> that will be visible to visitors to the parent page. I roughly imitated this here (using static content, without actually contacting our server):
http://troy.onespot.com/static/3263/stage4.html
That is the problem. When I get this HTML content and paste it into the second <iframe>, now I am facing an unusual problem with a broken back button. This happens in Firefox 3.0 and in the entire version of IE (possibly in other browsers), although this does not happen in some browsers that I tested (Firefox 3.5, Safari, Chrome). See this page:
http://troy.onespot.com/static/3263/stage5.html
If you click on the Google link, everything seems fine. But when you go to the previous page (which has the last test script), another JavaScript error is introduced: "Permission denied". This does not terminate the script, and apparently does not have any negative consequences, besides the fact that I assume that it is connected with the broken functionality of the back button, which is a very big problem - one that I am desperately trying to solve . I find it difficult to debug this error since its call stack starts and stops in a jQuery script.
You may also encounter this error - with more serious symptoms - by going to the last link above (stage5.html - clear your browser cache first). Click the "Step 5 (again)" link, then, after loading this page, click the "Back" button.
The back button is completely broken! You cannot go anywhere other than another URL.
This is a problem that I need to solve as soon as possible. Any ideas or help would be greatly appreciated!
I cannot deviate too much from this method, so outside suggestions are certainly welcome, but I may not be able to use them due to limitations of the widget specifications. I would rather understand why the back button breaks down and how to fix it, along with the "Resolve reject" error associated with jQuery.