1 Iframe, 2 Sources - Combine Files for 1 Iframe - html

I need to display 2 files in one iframe. Currently, I have 2 iframes which isn't a good solution for my site. I'd rather have 1 iframe that displays both files.
I am using this in a magento attribute so I don't think js will work without doing some development. Any suggestions?
<iframe src="/path/to/file-001.html" frameborder="0" scrolling="yes" seamless="seamless" style="display:block; width:100%; min-height:325px;"></iframe>
<iframe src="/path/to/file-002.html" frameborder="0" scrolling="yes" seamless="seamless" style="display:block; width:100%; min-height:325px;"></iframe>

I ended up using php to include file 2 at the bottom of file 1 and then just using file 1 in the iframe.

Related

iframe in Smarty (tpl)

I have this iframe html code
<iframe title="Sales-AdventureWork - Page 5" width="100%" height="100%" src="https://app.powerbi.com/view?r=eyJrIjoiOWFjOWZjYjAtY2RmYi00OGYxLTg2ZWYtNjQ5NjJkN2E5ODAzIiwidCI6ImUwYjNmMTA2LWU2Y2QtNDNjOS05NGUxLTRkMzMwMWNjZWMzOCIsImMiOjl9" frameborder="0" scrolling="no" allowFullScreen="true"></iframe>
from power bi which working very well in html page but when I try to embed it into smarty tpl file it shows it partial view like pic num 1
but the same code working very well in html like pic num 2
Height cannot be 100%. Should be a static number.

Displaying pdf files without using external libraries

In my Angular app, I have included the following snippet in an html template:
<embed src="../assets/AOK_T2DM.pdf" style="width: 100%;height: 500px" type="application/pdf">
It appears as follows:
When I click open, the pdf file is downloaded.
How can I simply display the content instead of downloading it?
<iframe src="https://docs.google.com/viewer?url=https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf&embedded=true" frameborder="0" height="600" width="100%"></iframe>
Use Below Code
<iframe src="https://docs.google.com/viewer?url=File_URL&embedded=true" frameborder="0" height="1100px" width="100%"></iframe>
Set height as per your need or give the height as 100% and set the height for the parent div.
Check and update if it works.

How to load mulitple urls into one iframe?

I have a list of urls (lets call them url1.com,url2.com,url3.com). I want to load their contents into an ifram so i can copy them. However, if i create seperate iframes for each url i cannot copy them at one. Is it possible to load multiple urls into one ifram which i can then copy. The urls only contain a string of letters and nothing else.
https://pastebin.com/mQVRPXe4
<iframe src="https://url1.com" src = name="targetframe" allowTransparency="false" scrolling="no" frameborder="0" >
</iframe>
<iframe src="https://url2.com name="targetframe" scrolling="no" frameborder="0" >
</iframe>
<iframe src="https://url3.com name="targetframe" allowTransparency="true" scrolling="no" frameborder="0" >
</iframe>
You can do a couple of things. Namely, use ajax requests or style the iframes. You can easily remove the border on the iframe with the frameBorder attribute.
I know this isn't really the best answer, and I'm not really sure what you are really trying to do here, but I was asked to put this as an answer

IFrame issue using google docs viewer

I am trying to embed a PDF document using google docs viewer:
<iframe src="http://docs.google.com/gview?url=MY_FILE_URL&embedded=true" style="border: none;" height="900" width="100%"></iframe>
and Its working fine, but when I try to refresh the page multiple times.. sometimes IFrame content does show up and some other times It doesn't,and I get an empty head and body inside "IFrame " tag
tried to set expires to: 0
tried to add random numbers: MY_FILE_URL?var=rand() to solve some
cash issue
tried to add IFrame using jquery on after page has loaded
nothing seems to solve my problem..
you are not accessing the https version is the issue.
I had the same issue
change:
<iframe src="http://docs.google.com/gview?url=MY_FILE_URL&embedded=true" style="border: none;" height="900" width="100%"></iframe>
to
<iframe src="https://docs.google.com/gview?url=MY_FILE_URL&=embedded=true" style="border: none;" height="900" width="100%"></iframe>
hope that helps :)

Facebook like box problems using IFrame

I have a problem with the Facebook like box, from the Facebook developer section. The problem is, whenever I open up my web page, I just get this error message:
Error 6 (net::ERR_FILE_NOT_FOUND): The file or folder wasn't found.
Should I make a file on my own or what?
I'm using the iframe option in HTML programming:
<iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebo
ok.com%2FTriplex.Mobildiskotek&width=800&height=395&colorscheme=dark&
amp;show_faces=false&border_color&stream=true&header=false" scrolling=
"no" frameborder="0" style="border:none; overflow:hidden; width:800px; height:395
px;" allowTransparency="true"></iframe>
This works just fine:
<iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2FTriplex.Mobildiskotek&width=800&height=590&colorscheme=light&show_faces=false&border_color&stream=true&header=true&appId=219650941461322" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:800px; height:590px;" allowTransparency="true"></iframe>
You can see it working at http://jsfiddle.net/nbeQH/.
The first is your code, the second is mine. So you could see yours gives an error, while the other doesn't.
You need to add http: to the beginning of the code and you're all set.
http://www.facebook.com/plugins...