|
| | |||||||
| Internet Explorer Discuss IE7 or any other IE version. |
| | LinkBack | Thread Tools |
|
#1
| |||
| |||
| IE 7, Access Denied errors, document.domain Hi... We put up websites for people and have been using FreeTextBox for years as the editor. Mostly we've never had any trouble with it, but dropping it in a certain client's pages has been a nightmare. All of a sudden IE 7 is throwing Access Denied errors at many of the places where FTB tries to tweak its iframe scratch pad that we've never seen before. I found a couple of google threads mentioning that if script running in the parent window does document.domain = 'foo.com'; then all iframes on the page must also set themselves to the same domain or things won't play well together. I tried several ways to make the FTB iframe set its domain to the same value as the parent window but it didn't help. I tried <iframe onload="javascript:document.domain='foo.com'" ...> <iframe src="/body.html" ...> (where body.html just had <script language="javascript"> document.domain=foo.com'; </script> in it) but neither helped the access denied error messages. After a lot of jiggering with the host file, I co-opted the partner's script source and commented out the document.domain setting and went back to no src= for the FTB iframe, and things worked fine - So that is evidence that the problem is tied to the document.domain setting in the client script. How *does* one work with iframes in a page that script has farted on by tweaking document.domain? Thanks Mark Thanks Mark <textarea name="FTB_body" id="FTB_body" style="display: none;"></textarea> <iframe id="FTB_body_Editor" name="FTB_body_Editor" title="Editor" height="350px" width="100%" onBlur="FTB_CopyHtmlToHidden('FTB_body');"></iframe> <script language=JavaScript> <!-- function IsOkToLeave() { if (typeof FTB_body_Editor != 'undefined' && FTB_body_Editor.document.body.innerHTML.match(/^(<br>)?\s*$/) == null) {return 'Leaving the page now will erase your message text. Do you want to continue?';}} window.onbeforeunload = IsOkToLeave; FTB_Initialize('FTB_body'); </script> |
| |
|
#2
| |||
| |||
| RE: IE 7, Access Denied errors, document.domain This IE behavior is really ****ed annoying. I put a src url on the iframe, and in the page it points to I have it setting document.domain to the same value as the parent. The script also does an alert to show the value of document.domain. The I put a 5 second delay in the parent before it tries to touch the child iframe at all. It also does an alert to show the parent's document.domain. The 2 values are the same but I'm still getting the Access Denied error trying to touch anything in the child iframe. In short, it just doesn't look like there's any way for the parent to deal with a child iframe if anybody touches document.domain. I've seen lots of discussion on the net about this saying "just make sure the document.domains are the same" but no examples. Has anyone gotten themselves out of this hole? Thanks Mark "Mark" wrote: > Hi... > > We put up websites for people and have been using FreeTextBox for years as > the editor. Mostly we've never had any trouble with it, but dropping it in a > certain client's pages has been a nightmare. All of a sudden IE 7 is > throwing Access Denied errors at many of the places where FTB tries to tweak > its iframe scratch pad that we've never seen before. > > I found a couple of google threads mentioning that if script running in the > parent window does > > document.domain = 'foo.com'; > > then all iframes on the page must also set themselves to the same domain or > things won't play well together. > > I tried several ways to make the FTB iframe set its domain to the same > value as the parent window but it didn't help. > > I tried > <iframe onload="javascript:document.domain='foo.com'" ...> > <iframe src="/body.html" ...> (where body.html just had > <script language="javascript"> > document.domain=foo.com'; > </script> in it) > > but neither helped the access denied error messages. > > After a lot of jiggering with the host file, I co-opted the partner's script > source and commented out the document.domain setting and went back to no src= > for the FTB iframe, and things worked fine - So that is evidence that the > problem is tied to the document.domain setting in the client script. > > How *does* one work with iframes in a page that script has farted on by > tweaking document.domain? > > Thanks > Mark > > > > Thanks > Mark > > > <textarea name="FTB_body" id="FTB_body" style="display: none;"></textarea> > <iframe id="FTB_body_Editor" name="FTB_body_Editor" title="Editor" > height="350px" width="100%" > onBlur="FTB_CopyHtmlToHidden('FTB_body');"></iframe> > > <script language=JavaScript> > <!-- > function IsOkToLeave() { > if (typeof FTB_body_Editor != 'undefined' && > FTB_body_Editor.document.body.innerHTML.match(/^(<br>)?\s*$/) == null) > {return 'Leaving the page now will erase your message text. Do you want to > continue?';}} > window.onbeforeunload = IsOkToLeave; > > FTB_Initialize('FTB_body'); > </script> > |
| Bookmarks |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| IE 7, Access Denied errors, document.domain | Mark | Internet Explorer | 0 | 03-29-2009 08:55 AM |
| IE 7, Access Denied errors, document.domain | Mark | Internet Explorer | 0 | 03-29-2009 08:52 AM |
| Loading settings fails (Access is denied) for domain accounts | Dima | Windows XP | 0 | 07-16-2008 11:40 PM |
| Access denied on shared Document folder | James Cunningham | Windows XP | 1 | 02-14-2008 04:40 AM |
| Access denied errors with outlook opening its data file | chall3ng3r | Windows Vista | 2 | 01-02-2007 10:26 AM |
| New To Technology Questions? | Do You Need Help with Your Computer or Device? | Do You Need Help with this site? |