Re: Javascrit error 'Access Denied'

  •  01-20-2005, 4:55 PM

    Re: Javascrit error 'Access Denied'

    Hi Terry,
     
    First of all, I'm running all of this on a secured Intranet so I can't post you any URL's unfortunately.

    In our organisatoin, we deploy all our web applications as portlets within a portal server.  The simplest way to deploy our ASP.Net apps in the portal server is to wrap them up inside iframes.

    In this example, I have my ASP.Net application with the CuteEditor control on a page like this:

    http://scripts.mydomain.org/myproject/mypage.aspx

    The ASP.Net application including the CuteEditor control is framed within an iframe by our portal server on a page with a URL something like this:

    http://portal.mydomain.org/dir/dir/dir/somepage.jsp

    The parent frame and the iframe are able to talk with each other through the browser, because in both the parent (portal) page and the iframe (ASP.Net) page I've added the following line of JavaScript code on each page.

    document.domain = "mydomain.org";

    This basically allows for our pages within the ASP.Net Application to resize the iframe window so you don't see any scroll bars etc.  In fact you can't even tell it's running as an iframe, it just looks like it's part of the Portal server.  This is working fine, however when I load the page with the CuteEditor Control into the iframe, i get an 'Access Denied' message.  This is probably because the control creates it's own frame for serving JavaScript to the browser, but in that frame it will be running as 'scripts.mydomain.org', so the browser won't allow it to execute.

    I believe that I could fix this, if i can force the CuteEditor control to use the same document.domain, 'mydomain.org'.

    As a work around, it may be possible to simply remove the document.domain property from the ASP.Net page which has the CuteEditor Control, and remove the functionality which is resizing the Portal Frame when the ASP.Net page loads.  This should work, but it's not ideal.  However, if your interested at all, i have posted another issue where the browser crashes when i do this: http://cutesoft.net/forums/ShowPost.aspx?PostID=3586

    Thanks for your help on this! - Everyone I have shown the CuteEditor control to has been very impressed with it, in particular the spellchecking and ease of which you can create tables.  So I really hope I can manage to sort this out and implement the first of many CuteEditor controls within our organisatoin.

    Regards,

    /Simon
     
View Complete Thread