iframe in Smarty (tpl) - html

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.

Related

Full Size iframe in smarty

I have this embedded html iframe code
<iframe title="Sales-AdventureWork - Page 5" width="110%" height="100%" src="https://app.powerbi.com/view?r=eyJrIjoiOWFjOWZjYjAtY2RmYi00OGYxLTg2ZWYtNjQ5NjJkN2E5ODAzIiwidCI6ImUwYjNmMTA2LWU2Y2QtNDNjOS05NGUxLTRkMzMwMWNjZWMzOCIsImMiOjl9" frameborder="0" allowFullScreen="true"></iframe>
for power bi reports, when I try to insert it into whmcs smarty (tpl) file it shows a partial frame not full size height and width like pic below
I need your help to show it in full size like the secound pic which works fine in html page .

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.

iframe with scripplet jsp in src

I am working in iframe with a scrippplet in the src, but it is not working
<iframe src="<%=urlProdMatch%>" width="550" height="500" frameborder="0" allowtransparency="true"></iframe>
However, urlProdMatch has a url
<h4><%=urlProdMatch%></h4>
It prints the value the url, but in the iframe shows nothing
Thanks a lot.
Have you had a look at the source for the IFrame? (i think they're evil, by the way)
My guess is the the data is being written out, but it gets written between the script brackets and therefore doesn't show up.
Try this version:
<script type="text/javascript">
document.write("BUT THIS DOES PRINT!");
</script>
<%
response.getWriter().println("THIS DOESN'T PRINT");
%>

Embed office form via iframe

I was wondering that why the office form cannot be embedded into iframe perfectly.
Like the following code
<iframe src="https://forms.office.com/Pages/ResponsePage.aspx?id=Ix5rlILy0USDoDcUdHBCThkWvcx4TptKrO0BZZzx9edUMzFRTDdOMTk1NThIMEs1WFFSNzBWNFdFUi4u" style="height: 300px;">
<p>Have you completed the survey?.</p>
</iframe>
https://jsfiddle.net/n7e3wv6v/
It only displays the pop-up link, the users have to click the link and then fill the question on the pop-up page which is not convenient.
Is there a way to embed the whole form?
Make the height and width of iframe >= 350.
<iframe src="https://forms.office.com/Pages/ResponsePage.aspx?id=Ix5rlILy0USDoDcUdHBCThkWvcx4TptKrO0BZZzx9edUMzFRTDdOMTk1NThIMEs1WFFSNzBWNFdFUi4u" height="350" width="350">
</iframe>
This works! below 350 dimension it doesn't.
https://jsfiddle.net/qnsj1k3o/2/

1 Iframe, 2 Sources - Combine Files for 1 Iframe

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.