I'm trying to add an Embed code in my Google Site
In the HTML, I'm trying to use <iframe> to display other sites in .aspx and .php.
<iframe> works totally fine with .aspx site. However, it does not display .php content.
To display .aspx, this is how my <iframe> part code looks like, which works fine.
<iframe
src="https://XXXX.aspx"
frameborder="0"
scrolling="no"
style="overflow:hidden;height:100%;width:100%"
height="100%"
width="100%">
</iframe>
However, when I added a .php site to iframe, it either shown nothing or returned 404 error.
The following was what I tried, and both of them did not work.
This returns a blank page
<iframe
src="https://www.php.net/manual/en/tutorial.firstpage.php"
frameborder="0"
scrolling="no"
style="overflow:hidden;height:100%;width:100%"
height="100%"
width="100%">
</iframe>
AND
This returns a 404 error
<iframe
src=<?php print "https://www.php.net/manual/en/tutorial.firstpage.php" ?>
frameborder="0"
scrolling="no"
style="overflow:hidden;height:100%;width:100%"
height="100%"
width="100%">
</iframe>
Please help!
This problem occurs when you enter wrong address in your Iframe tag.
please check that or tell us that address you want put in iframe.
You can test it out by putting
<!DOCTYPE html>
<html>
<body>
<iframe src="https://www.php.net/manual/en/tutorial.php">
</iframe>
</body>
</html>
into a new html doc and then open with a browser, you will see that
Refused to display 'https://www.php.net/manual/en/tutorial.php' in a
frame because it set 'X-Frame-Options' to 'sameorigin'.
in the broswer's console.
https://stackoverflow.com/a/27359031/8062552
Related
I want to embed a sound cloud in my html and below is link of the track file.
https://soundcloud.com/aviciiofficial/preview-avicii-vs-lenny
How to make this display in my webpage like embedding YouTube video?
Open the https://soundcloud.com/aviciiofficial/preview-avicii-vs-lenny link in browser and in page there is a share button, click it and popup will load and in there click embed tab and copy the code
use
<iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/41395010&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe>
do you mean something like this?
<iframe allowtransparency="true" scrolling="no" frameborder="no" src="https://w.soundcloud.com/icon/?url=http%3A%2F%2Fsoundcloud.com%2Faviciiofficial%2Fpreview-avicii-vs-lenny&color=orange_white&size=32" style="width: 32px; height: 32px;"></iframe>
I used this https://soundcloud.com/pages/embed
I am loading a web page inside an iframe. If I load the page without the iframe I using the same url it works as expected. However if the iframe loads the url it doesn't work. I have tried googling it and all I can seem to find is how to pass variables in to an iframe.
the url is
http://www.angry-android.com/chartTest.html?start=2014-05-01&end=2014-06-01
and the iframe code I am using is
<iframe scrolling="no" src="http://www.angry-android.com/chartTest.html?start=2014-05-01&end=2014-06-01" frameBorder="0" width=315 height=200 ></iframe>
Any assistance would be greatly appreciated.
SOLVED
Turns out it is a firefox bug. The code worked as expected in other browsers.
My apologies should have checked that before posting.
It seems to be working for me:
<iframe scrolling="no" src="http://www.angry-android.com/chartTest.html?start=2014-05-01&end=2014-06-01" frameBorder="0" width=315 height=200></iframe>
I want to show a youtube video in html 4. For that, I am using iframe. But the content of iframe is not showing.
<iframe frameborder="1" width="420" height="345" src="https://www.youtube.com/watch?v=C8kSrkz8Hz8"></iframe>
FYI: I am using Firefox 29.0 and Chrome 35.0. Both browsers are showing the same result.
Change your src with //www.youtube.com/embed/C8kSrkz8Hz8
your code shoud look like this
<iframe frameborder="1" width="420" height="345" src="//www.youtube.com/embed/C8kSrkz8Hz8"></iframe>
Find code under each video on youtoube at Share menu.
When you try to put the whole YouTube page into an iframe, it sends a HTTP header called X-Frame-Options with the SAMEORIGIN value, which tells the browser, that the page can only be displayed in a frame on the same origin as the page itself.
You should use the provided embed code (you can find it below every YouTube video), which is also an iframe, but with a different URL. It will only show the player.
In this case, the embed code would be:
<iframe width="560" height="315" src="//www.youtube.com/embed/C8kSrkz8Hz8" frameborder="0" allowfullscreen></iframe>
replace you Iframe with this one. this works for you.
<iframe width="640" height="390" src="//www.youtube.com/embed/C8kSrkz8Hz8" frameborder="0" allowfullscreen></iframe>
missing attributes are: frameborder="0", allowfullscreen
You should change the youtube URL to remove the "s" so it looks like this:
<iframe width="420" height="345" src="//www.youtube.com/embed/C8kSrkz8Hz8" frameborder="1" allowfullscreen></iframe>
You should also be able to embed a youtube video from the page. Please see the screenshot attached:
I tried it this way and worked for me. Changing your src="https://www.youtube.com/embed/C8kSrkz8Hz8"
following the other parameters.
I am trying to insert a iframe on my website, http://freefreemarkets.com, that allows me to insert the website showing what I am selling on eBay.
I have never created an iframe before.
<iframe src="http://www.website.com"></iframe>
And you can edit how you want by adding stuff like:
width="400" height="215" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" etc..
You need to use an iframe, by specifying the src attribute:
<iframe src="http://www.example.com"></iframe>
Some websites doesn't support to be embedded in iframe, be careful.
This is the code I am using. There is an iframe on a table I made.
<td height="100%">
<iframe src="http://mk7vrlist.altervista.org/combocalculator/indextts.html" width="100%" height="100%">
Your browser doesn't load this iframe.
</iframe>
</td>
By the way, inside my iframe I don't see anything and the url I put is not showed. I've googled around this but I don't find a solution. Any help?
Sites like google and yahoo prevent their pages from getting loaded in an iframe
Check this stackoverflow thread google homepage will not load in an iframe
They are using X-Frame-Options: Deny to block their content from loading in an iframe.
Try anything else other than google and yahoo and you will see that it works
<td height="100%">
<iframe src="http://www.w3schools.com" width="100%" height="100%">
Your browser doesn't load this iframe.
</iframe>
</td>