Blocked iframe work-around - javascript

I have the following iframe:
<iframe src="https://www.weddingwire.com/morgancamille" style="border:0px #FFFFFF none;" name="weddingwirersvp" scrolling="no" frameborder="0" marginheight="0px" marginwidth="0px" height="600px" width="600px"></iframe>
... and it would appear that the website who's form I would like to display elsewhere has some iframe-specific parameters to deter people from displaying the form on other sites. Any ideas on how to get around this?

Changing the document to that particular iframe may help. Otherwise, you are running up against the intended purpose of iframes. You say you want to display elsewhere, but the purpose of an iframe is to prevent it from being displayed elsewhere.
jQuery/JavaScript: accessing contents of an iframe May be helpful here.

Related

Prevent an iFrame from redirecting to a url other than the src url

I have an iFrame that displays a 3rd party eform for our customers to fill out. After the form is submitted, the iframe displays another page that I would like to prevent from showing. I've tried using the sandbox attribute to accomplish this but it doesn't seem to have any effect.
<iframe src="form-url"
width="100%" height="1200px" scrolling="no" sandbox="allow-forms allow-scripts"></iframe>
In HTML5 you can use sandbox property. Please see Pankrat's answer below. http://www.html5rocks.com/en/tutorials/security/sandboxed-iframes/

HTML iFrame not working

Why my code is not working, it is still useful to yesterday. Please , I've no idea on it.
<iframe allowfullscreen="" allowtransparency="true" frameborder="0" height="2000" scrolling="no" src="http://www.google.com" width="100%"></iframe>
But it shows on this url with the same code:
<iframe allowfullscreen="" allowtransparency="true" frameborder="0" height="2000" scrolling="no" src="http://www.live3s.com" width="100%"></iframe>
.. I really have no idea. Please help me. I want to iframe this url "http://mmfootballtv.wix.com/home#!youtube-links/uzgjx" . Thank you for interesting my problem.
You can't, below is the reason. In other words the problem is not in your code, there are other google apis which you can use to embed google search, you just need to google it.
P.S. If something is not working as it should you can always hit F12 and check the developer console, that's how i found about the problem.
about:blank:1 Refused to display
'https://www.google.bg/?gfe_rd=cr&ei=pUTEVvKaD4eJ8QeK26n4BQ' in a
frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
you can't just put another website form a different domain in an iframe. Because of security reasons this is sometimes blocked. It is called clickjacking. for more information https://www.owasp.org/index.php/Clickjacking

embedding a web page in iFrame problem

I embedded a web page in an iFrame like this:
<iframe id="frame" src="http://www.domain.com" width="100%" frameborder="0" marginheight="0" marginwidth="0"></iframe>
Edit: The problem i am having is that the web page javascript is using the top property to find objects but now it is embedded in the iframe, is there a way to over ride this?
If I understand you right, you want to send data from the iFrame to the parent? If so, the error happens because Cross Site Communication is usually blocked to avoid XSS attacks. But you can keep your iframe, and use JavaScript and the window.postMessage(); function to share data.
https://developer.mozilla.org/en/DOM/window.postMessage

iframe location.hash #top not working in ie8

i am having this problem for a week couldn't figureout kindly help!
1.I have a dynamic news page.
2.below the news a comments page attached with an iframe.
3.comments page is having pagenation.
when user navigate trough pages in iframe parent page should scroll to iframes top for that i have used #top in iframe links its working in all browsers except in IE8 (i didn't check in other versions of ie though), so please help me out with it.
thanks,
eeswar
In the outer page, define a scroller function:
<script type="text/javascript"> function gotop() {scroll(0,0);} </script>
Then when you define the iframe, set an onload handler (which fires each time the iframe source loads i.e. whenever you navigate to a new page in the iframe)
<iframe id="myframe" onload="try { gotop() } catch (e) {}"
src="http://yourframesource" width="100%" height="999" scrolling="auto"
marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" >
</iframe>
The nice thing about this approach is it means you do not need to make any changes to the pages included in the iframe (and the iframe contents can happily be in another domain - no cross-site scripting issues).

Can I track an IFRAME widget with Google Analytics?

We are going to launch JS based widgets which webmasters (any site) will be putting on their site by embedding a small code snippet like :
<iframe src="SOURCE_PATH" frameborder="0" width="300px" height="150px" scrolling="no" id="cd_frame"></iframe>
Inside the widget there are three links and we need to track how many clicks are happening on them from the external sites where the widget is going to get used.
If I simply put the code which GA provides will that work? OR do I need to make any changes?
Thanks.
you should be able to track from your iframe as it would appear to google analytics as a regular page. your issue would be knowing what iframe you were tracking. if you can pass a unique id via the iframe url then you should be able to add a custom parameter to track the different sites.
eg
<iframe src="SOURCE_PATH?uniquetrackingid=123" frameborder="0" width="300px"
height="150px" scrolling="no" id="cd_frame"></iframe>
information about custom tracking codes can be found here
http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=55585

Categories

Resources