Iframe problems with Gmail - html

I'm pretty new to coding, and am trying to make a small chrome extension that displays my gmail in an Iframe. I'm having several problems: I have to sign in with google inside my Iframe, and the gmail will refuse to display when I try loading the extension. Keep in mind, the iframe works fine with websites like "https://ifunny.co", but it will refuse to work with anything Google.
My html box that pops up with the click of the extension button:
<!DOCTYPE html>
<html>
<!---body>
<iframe src="https://ifunny.co" style="border:2px solid black;" height="500" width="350"></iframe>
</body--->
<body>
<iframe src="https://mail.google.com" style="border:2px solid black;" height="500" width="350" name="myIframe" id="myIframe"></iframe>
</body>
</html>

Related

How to fix youtube live chat in HTML

I'm new to code and I want to implement a code that puts the youtube live chat onto the page. Right now it is refusing to connect.
Here is my code:
<html>
<head>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<iframe id="pewdiepie" height="80px" width="300px" frameborder="0" src= "https://akshatmittal.com/youtube-realtime/embed/#!/UCq-Fj5jknLsUf-MWSy4_brA" style="border: 0; width:300px; height:80px; background-color: transparent;"></iframe>
<p>
<iframe id="tseries" height="80px" width="300px" frameborder="0" src="https://akshatmittal.com/youtube-realtime/embed/#!/UC-lHJZR3Gqxm24_Vd_AJ5Yw" style="border: 0; width:300px; height:80px; background-color: transparent;"></iframe>
<p>
<iframe height="500" width="300" src="https://www.youtube.com/live_chat?v=UVxU2HzPGug&embed_domain=<MY_IP>" style="border: 0; width:300px; height:100px; background-color: transparent;"></iframe>
</body>
</html>
Is there anything wrong with the code? And how I can fix it? By the way I hid my IP address.
To embed a youtube live chat, the link must be like this:
"https://www.youtube.com/live_chat?v=<id_video>&embed_domain=<your_domain>"
So, to embed your chat on stackoverflow, it will be:
"https://www.youtube.com/live_chat?v=UVxU2HzPGug&embed_domain=www.stackoverflow.com"
EDIT :
Here is the official documentation from google.
During a live stream, you can embed live chat on your own side by using an iframe.
Get the video ID for the live stream. You can get the video ID from the watch page URL (youtube.com/watch?v=12345). In this case, the video ID is ‘12345’.
If you chose "Stream now," right-click on the player and select Copy video URL to get the video URL.
Get the domain URL for the site you want to embed chat on. If you're embedding chat on www.example.com/youtube_chat, your embedding domain is "www.example.com."
Combine the embedded URL in the following way: https://www.youtube.com/live_chat?v=12345&embed_domain=www.example.com.
This is the URL for your iframe. Note the embed_domain must match the the URL of the page you’re embedding the chat on. If they are different, the embedded chat will not load.

Cannot see OpenStreetMap, Ruby on Rails

I would like to add OSM to my website (in Ruby on Rails), so I've exported following html code from their site:
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.openstreetmap.org/export/embed.html?bbox=-109.3359375%2C56.84897198026975%2C25.3125%2C84.38877975103257&layer=mapnik&marker=76.23088818107027%2C-42.076958649999995" style="border: 1px solid black"></iframe><br/>
<small>see more</small>
and I've put it into
<!DOCTYPE html>
<html>
<body>
//here
</body>
</html>
The problem is, that there is only empty rectangle, without map, but when I click "see more" I'm redirected to OSM site with big map.
What can cause, that I can't see map on my site?
Edit:
I've just seen, that it only doesn't work only in desktop browser, when I use my mobile phone is ok.

HTTPS breaking embedded PDF

I just switched to HTTPS on my website. I had been displaying a locally hosted PDF via an iframe; the iframe displays a small html file with the PDF embedded (as an object) in it. However, the PDF is no longer displaying. I can navigate to the PDF & it displays just fine but does not display when I load the html page. What can I do to make the PDF display?
iframe
<iframe src="/updates/update.htm" width="100%" height="800px"
marginheight="0" frameborder="0"></iframe>
update.htm
<html>
<header>
<link rel="stylesheet" href="custom-styles.css">
</style>
</header>
<body>
<object src="update.pdf"
type="application/pdf" width="100%" height="800px"><div id="show-text">
<p>It appears your web browser is not configured to display PDF files.</p>
<p><a href='update.pdf'>Click here to download the PDF file.</a></p>
</div>
</object>
</body>
</html>
custom-styles.css
#show-text {
display: block;
width: 100%;
height: 15%;
background: #D1D1D1;
}
Shot in the dark here, but are you sure that "/updates/update.htm" is the right path? If your page is www.site.com/something/index.php and you use that path, the browser will look for www.site.com/something/updates/update.htm. Perhaps you want www.site.com/updates/update.htm. Maybe you need a relative path like "../updates/update.htm"
UPDATE
Try <object data="update.pdf">. The <embed> tag uses scr=; <object> uses data= according to w3schools.

Responsively embed webpage within webpage

I'm building a webapp designed for iDevices to be used in combination with the school website. I'd like to have one section of the webapp have an embedded clip of the school website. Typically I'd use something like this, and be done with it:
<object data=http://www.schoolwebsite.org width="600" height="400"> <embed src=http://www.schoolwebsite.org width="600" height="400"> </embed> Error: Embedded data could not be displayed. </object>
But that won't responsively, and account for rotation of an iPad or utilization of a different platform.
How would I edit that code, or create new code to embed an existing webpage within another webpage?
The tag you are looking for is iframe:
<iframe src = "http://www.example.com" />
This shows the webpage specified in the page that the code is in.
You can also customize it if you want, specifying the border in the style:
<iframe src = "http://www.example.com" style = "border: 1px solid" />
Replace 1px with the size of the border.
Also in the style tag, you can specify the size, or you can just specify the width: and height properties.
try an iframe:
<iframe src="http://www.schoolwebsite.org" style="border:1px black solid;" name="frame" scrolling="auto" frameborder="0" align="top" height="400px" width="600px">
</iframe>

PDF viewer overlaps other objects on the page in Google chrome

I have an issue with a page browsing with Google chrome. When Google chrome plugin 'Chrome PDF Viewer' is disabled, the PDF being display overlaps every object. Below is a sample code.
<html>
<head>
</head>
<body>
<div style="border: solid red 2px; position:absolute;z-index:100;background-color:Green;height:100px;width:250px;"></div>
<div style="position:absolute;z-index:10;margin-left:100px;">
<iframe visible="true" id="ipdf" src="http://www.irs.gov/pub/irs-pdf/fw4.pdf" height="1000" width="1000" runat="server" frameborder="0" scrolling="auto" >
</iframe>
</div>
</body>
</html>
Any suggestion will be helpful.
Do you think it works any better e.g. in Internet Explorer with Adobe Reader plugin?
As far I know it has the same issue and you have to use another iframe for overlay areas.