I'm using code in an iFrame to embed news in a website. I am unable to customize the iFrame.
<iframe src="http://www.google.com/uds/modules/elements/newsshow/iframe.html?topic=n,p,s,n&rsz=small" frameborder="0" width="728" height="90" marginwidth="0" marginheight="0"></iframe>here
If you want to customize content of iframe , its not possible in cross domain iframe. browsers not allow to access any DOM object of cross site. and if it is same domain then its possible. I think in your case its looking cross domain frame.
You can customized the iframe itself (border width, color, etc.) but cannot change the contents of the source URL. I will note, however, that if the source URL did not set a background color, you can set the default content background color from the iframe using a CSS style statement.
BTW, do note that Google "newsshow" has been deprecated for a long time and now no longer works.
Here is a Google News RSS replacement that in many ways is better:
http://www.gooplusplus.com/news-frame-guide.html
See forum article here:
http://crunchbang.org/forums/viewtopic.php?id=26985
Related
i am using a simple iframe html code where i am embedding the jitsi meet url. now the problem is after finishing a meeting with jitsi it redirects to its close3.html page. i dont want to show this in my iframe. i want to close my iframe when it redirects to close3.html page. i have tried with sandbox. but after using sandbox camera and microphone access turns disable.
here is my iframe code
<iframe
title="Open identification process"
src="https://meet.jit.si/4b7562c798c20e3dd523b2298cad5327"
frameBorder="0"
width="600"
height="800"
allow="camera; microphone"
id="iframe"
onLoad="alert('Test');"
/>
You will face the Same Origin Policy when you try to do.
You can't access an <iframe> with different origin using JavaScript,
it would be a huge security flaw if you could do it.
Even so, you could use that method:
document.getElementById("iframe_id").contentWindow.location.href
Further Information
I have an iframe issue with the Chrome browser. In http://bulbanner.cf has the following iframe code:
<iframe src="http://bulbanner.cf/script.html" width=468 height=60 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling="no" title="BulBanner - banner exchange"></iframe>
When you paste the code in another website, 468x60 sized banners are starting to visualize, because in the http://bulbanner.cf/script.html page has a rotator which shows random 468x60 sized banners. Shortly, something like this:
With Firefox everything is fine, but with Chrome very often the iframe doesn't work. Look the result with Chrome:
I think this is a security issue from Chrome browser, however is there any way to resolve it?
I have rights to change the iframe code or I can put some code in the http://bulbanner.cf/script.html page which is visualizing via the above mentioned iframe.
In this case the X-Frame-Origin header is generated by Google’s support page. So you can’t change that.
The website you want to make an iFrame has a .htaccess code that blocks iFrame request.
Like if you insert this code Header set X-Frame-Options DENY to your website’s .htaccess then any iFrame requests will be blocked.
Let's say I have an iframe hosted on www.my-iframe.com. And let's say that my iframe is embedded in a page on a different domain using:
<iframe src="http://www.my-iframe.com" scrolling="no" height="500" width="100%"></iframe>
Please note that the iframe tag has the attribute scrolling="no".
I only have access to edit the iframe code, not the pages on which my iframe is embedded. This makes it so I cannot change the scrolling attribute of the iframe html tag or the overflow: hidden; css styling of the iframe.
Is there a way that I can force a scroll bar to appear when necessary from within the iframe code?
Any help/advice is appreciated!
What you could try is maybe using a JS library to simulate a a scrollbar, there are plenty of them on the internet.
Here are a few examples (neither unordered nor necessarily the best ones): iScrollJS
fullPage.js
jQuery scrollbars
I have been trying to display PDF inside iFrame, it works well for all other browsers and platforms but not working with iOS. When I tried to access in chrome/Safari in iPhone/iPad, it shows the first page BUT does not allow to scroll down the PDF. And when it comes to HTML inside iFrame, it works perfectly, per my observation it looks like issue is with PDF inside iFrame on iOS. Tried all the links provided on various websites, overflow-auto, webkit scrolling, scrolling only y axis, position absolute/relative increasing the height which results in white pages and all other possible solutions, but no luck yet. The language of implementation is ASP.NET-C# where I am setting the iFrame source dynamically. Below is the source through which I am trying to achieve above task.
<div id="wrapper" class="Sales-container container">
<iframe runat="server" id="Contents" class="myiframe" scrolling="no" width="100%" height="100%" frameborder="0" />
</div>
.Sales-container{position:absolute !important;width:100%}
.container{margin-right:auto;margin-left:auto;padding-left:7px;padding-right:8px}
.myiframe{z-index:0;white-space:nowrap}
Any help would be much appreciated.
Thanks.
If you don't need https, you can use the google docs viewer
make the src http://docs.google.com/gview?url=YOURADDRESSHERE&embedded=true
If that won't work for you, I'm currently looking into pdf.js
Explanation of problem in full below, you could probably just skip to the code at the bottom if you want.
What happened is a impatient client wanted his swf banners converted to html5 without having to actually code them from scratch. So i utilized Google's new tool, Swiffy. I then tried to place this new generated html5 page in the header of the clients wordpress site. I have gotten it to load as an iframe but the problem that I am encountering is when you click on a link on the loaded html5 page, it just loads the linked page in the iframe, not the parent page/window (which is to be expected). I tried a bunch of other methods, and tried changing the AS2 links in the .fla as well but no luck. I am guessing Swiffy can not read every AS2 code, and so it has been ignoring my "_blank", "_parent" when I use getURL. Anyway, I have been trying to get it so when the iframe unloads to go to the linked page, it uses Java to just open the link on the parent page. But iframes cant use the onunload event, but I am pretty sure framesets can. So this is the code I was trying and it doesnt work.
<frameset rows="100%" onunload="window.open('http://www.goaefis.com/about-aefis/what-is-aefis/','_parent');">
<frame src="www.goaefis.com/banner_Test.html" frameborder="0" scrolling="no" />
</frameset>
Any help will be super appreciated.
try to use the "target" on your frames.
Here's a example:
http://www.w3.org/TR/html4/present/frames.html