![]() The iframe has an onload event on it, which calls a function from the FrameManager class, which we’ll need to call in the : Īnd here is the magical FrameManager class: var FrameManager = else if ((document.body) & (document.body. ![]() In our case we’re just reading in that information and using it to do the resizing. I would like for the iFrame to be resised depending on the height of the body inside the iFrame, so that the vertical scrollbars do not appear on the iFrame, but on the main frame The only way that I can think of to do that would be to re-load mainPage.aspx every time that the contents of the iFrame is changed, because the main page's content. You can’t really do anything malicious with just a hash tag. It is unlikely that this will ever break, so it’s not really a “hack”. This circumvents the security restrictions. The work-around is using hash tags in the URL to relay information back and forth. So this isn’t going to work for an iframe of. You’ll need to run JavaScript on both ends. This solution presupposes that you have control over both the hosting site and the source site. The following technique doesn’t require the middle man thing though, which is why it’s closer to ideal. This may have been inspired by a technique by John McKerrell. Same-domain iframes aren’t subject to the same restrictions so it’s far easier.Īdam Fortuna explored some options using kind of a man-in-the-middle idea. The contents of the
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |