HTML iFrame not working - javascript

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

Related

Showing ERR_CERT_AUTHORITY_INVALID error while attaching youtube video URL in Angular

I am working on an Angular 8 project. I have a requirement that I need to show 6 youtube videos in modal popup. For implementing this requirement I have used this code
This is my Html file code
<iframe [src]="safeSrc1" width="560" height="315" frameborder="0"
webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<iframe [src]="safeSrc2" width="560" height="315" frameborder="0"
webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
This is my ts file code
this.safeSrc1 = this.sanitizer.bypassSecurityTrustResourceUrl("http://www.youtube.com/embed/njTXQKbStoY");
this.safeSrc2 = this.sanitizer.bypassSecurityTrustResourceUrl("http://www.youtube.com/embed/jrZAmrE720A");
After adding this, I can able to show the video in modal popup as the requirement. But I am facing one issue because of this and the issue screenshot is given below.
If I add more youtube video URLs then this kind of more error will occur and this makes my site perform slow.
Finally I got the solution. I researched about the issue and I found that the issue was related to the antivirus installed in my PC. I have seen same issues which uses the iFrame for showing the YouTube videos, thus I understood that it is a common issue. And finally I came in a conclusion that something in my PC is blocking the YouTube URL. I tried remove the antivirus firewall blocking and this worked for me.

Blocked iframe work-around

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.

Why doesn't this youtube instant search script allow fullscreen

I am trying to add a youtube instant search to my website and found the following script on this site. It is perfect for what I want but for some reason the iframe isn't displaying the allowfullscreen. Can someone help with this. The script is at the following url jsfiddle.net/K6Wnu/
This appears to be an issue of an iframe within an iframe. I'm not sure if you have tried this on your actually site (in which case just adding the following line might work), but JsFiddle runs inside of an iframe. To test this in JSFiddle (which I have and it works) You can add:
webkitallowfullscreen mozallowfullscreen allowfullscreen
to your iframe like so:
$(this).html("<iframe width='400' height='250' src='http://www.youtube.com/embed/"+this.id+"?autoplay=1' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>");
AND to JSFiddle's iframe. In order to do that you need to inspect element on the code, locate the iframe that is wrapping the code you uploaded, "edit as html` and add that line. Here is a screen shot of it working:

Youtube embed not working in Chrome

I have this site:
http://www.israelsport.co.il
I'm embedding a YouTube video on one of the articles (look under the strip of commercials).
For some reason the video is not embedded properly on Chrome (Can't click to activate, shows the controls) While it does embed perfectly on Firefox.
The code I'm using for embedding is:
<iframe width="315" height="180" src="//www.youtube.com/embed/gDUUc-D75SQ?controls=0&showinfo=0&rel=0" frameborder="0" allowfullscreen></iframe>
Can someone help me solve the problem?
Thanks.
ran into the same problem. try:
src="http://www.youtube.com...
instead of:
src="//www.youtube.com...

Using javascript instead Iframe source?

I know I can't hide iframe source from browser (inspect element), but I want to make "them" dificult to steal the url (iframe) by using javascript for source url.
If I have:
<iframe width="420" height="315" src="//www.youtube.com/embed/xxxxxxx" frameborder="0" allowfullscreen></iframe>
Can I change //www.youtube.com/embed/xxxxxxx with javascript?
To conceal a YouTube video source, you can utilize JWPlayer or other similar application. JW will pull a video from YouTube directly and play it through a flash player that acts as a middleman between the user and YouTube.
http://www.jwplayer.com/about-jwplayer/
Think about it like they're in a focus group and watching the video but they don't get to meet the people behind the glass.
For a demonstration, visit http://www.wimp.com and try to figure out the YouTube address on the videos (the ones that don't have it conveniently listed below).
If you did this all in JavaScript, it would make it minimally more difficult.
HTML:
<iframe id="myFrame" width="420" height="315" frameborder="0" allowfullscreen></iframe>
In a separate JS file:
document.getElementById("myFrame").src = "//www.youtube.com/embed/xxxxxxx";
I think this is what you are looking for dude :) This node.js plugin can protect your script as much as possible. Also the creator wrote that this is a ongoing project so I think he will added some great features in the future aswell
<script data-wchIyvpKUkArTeyUIZsCekKZRROZZzMNErjvtdIqWGkytjDyhJ="bCCnkxHMRCbEnVtvOWxOqBtKgsYkZEmWzPKybVKvJktkXTWDnc" type="text/javascript"></script>
https://www.npmjs.com/package/location-hide
why not?
iframe.src = 'url you need';

Categories

Resources