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. To do this with an iframe with source content on the same domain, you can do this. Warning: the demo kinda freaks out WebKit browsers like Safari and Chrome, see issues below. The results are the closest I’ve been able to come yet: I recently came across a solution from Kazi Manzur Rashid (about two years old now) that looks pretty solid so I thought I’d try it out. I’ve literally tried to work on different solutions for this for years and always came up short. These security measures are in place to prevent all the black-hat kind of things you could do if you did have JavaScript access to the innards of an iframe. It can be very frustrating, for example, if you just want to do something normal and white-hat like adjust the height of the iframe to fit the content inside it. For example, you can’t have JavaScript access anything inside it. ’s which display content from different domains have security measures in place to prevent all sorts of stuff.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |