BryanHood Posted June 26, 2006 Share Posted June 26, 2006 The following code snippet is in one of my JavaScripts: function ResizeMe(idGrid, ExtraWidth, ExtraHeight) { if(window.frameElement != null) { if(window.frameElement.tagName == "IFRAME") { If I run the above code without any kind of Frames, it works fine. However, when the page loads inside a frame, I get an "Access is Denied" error whenever I try to reference the window.frameElement object.I am only developing this for IE, so I don't have to worry about Mozilla or Opera.Help!Thanks, Bryan Link to comment Share on other sites More sharing options...
aspnetguy Posted June 26, 2006 Share Posted June 26, 2006 are any of the frames in the frameset from other domains? Link to comment Share on other sites More sharing options...
BryanHood Posted June 26, 2006 Author Share Posted June 26, 2006 Yes. The Root site is on a different web server inside our Intranet. are any of the frames in the frameset from other domains?<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
aspnetguy Posted June 26, 2006 Share Posted June 26, 2006 it may be denying access because javascript isn't allowed to access frames that are not of the same domain. Link to comment Share on other sites More sharing options...
BryanHood Posted June 26, 2006 Author Share Posted June 26, 2006 Aaaarrrgggg! Is there a way around this?My code is just making sure that it's window is big enough to show a grid in it.Can I change the size of my "Current" window without trying to hit the parent frame set? it may be denying access because javascript isn't allowed to access frames that are not of the same domain.<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
aspnetguy Posted June 26, 2006 Share Posted June 26, 2006 here is some JS to check the size and resize if necessary var scr_w = screen.availWidth;var scr_h = screen.availHeight;var browseWidth, browseHeight;if (document.all){ browseWidth=document.body.clientWidth; browseHeight=document.body.clientHeight;}else{ browseWidth=window.outerWidth; browseHeight=window.outerHeight;}if (scr_w != browseWidth|| scr_h != browseHeight) { window.resizeTo(scr_w, scr_h); window.moveTo(0, 0);} Link to comment Share on other sites More sharing options...
netcracker Posted June 30, 2006 Share Posted June 30, 2006 also go trough this thread. it might prove helpfull ! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now