Iframe not loading complete contenty of webpage - javascript

I am using an Iframe to to display the web browser of several satellite receivers in my webpage. However it does not load the page in its entirety. The background shows up but I am not able to see the login and password tabs . It looks like the iframe is blocking some scripts from running or something as when I open the webpage in a normal browser I see the login screen after a few seconds delay.
Here is the code that does not work
<iframe id= "lrx09web" name= "lrx09web" width ="100%" height ="100%"
src="http://192.168.10.109/" sandbox="allow-scripts allow-popups
allow-forms allow-same-origin" scrolling ="yes"></iframe>
Please help

Related

Embed PDF in IFrame (same domain) and control height (scrollbars)

What I am attempting to achieve:
I have a page that has some header information followed by a document via embedded PDF and finally some footer information. Ideally, this would be displayed as one continuous document that could be printed as such.
What I have found:
I load the PDF into an iframe on the page. Because this document is not public it is requested via server-side action that checks permissions and returns the document as Content-Type: application/pdf;
This works to load the PDF but I am unable to turn off toolbars and other embedded PDF viewer controls (minor issue)
When I attempt to read the iframe document height using javascript in the containing page to modify the iframe height and thus remove the scrollbars I get a cross-domain origin issue despite the PDF loading from the same domain, server, etc.
Any help or pointers much appreciated.
There is a standalone viewer which you can use show pdfs:
<iframe src="https://docs.google.com/gview?url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>
This don't provide you with
toolbars and other embedded PDF viewer controls
EDIT : If you don't want to use the above option then you can also use PDF.js an open project to render pdf in html.
<iframe id="pdf-js-viewer" src="/web/viewer.html?file=%2Fmy-pdf-file.pdf" title="webviewer" frameborder="0" width="500" height="600"></iframe>

Adjusting iFrame size after page load

I have a reCaptcha in an iframe on my page. The reCaptcha changes it size, but the iframe not. This does not look nice. The users need to scroll now. I saw a few topics that address this problem. They work if the content stays the same during page load. But they do not work if the content changes when the page is loaded, this is happening in my case.
So my question is: how do I make an iFrame adjust size when the page is loaded using only html, css and if needed javascript . This is my html code:
<div>
<iframe aura:id="vfFrame" src="/partners/B2B_ReCaptcha" frameborder="0" width="100%"
allowtransparency="true" />
</div>
Any tips on how to tackle this problem?

auto click a specific location on an iframe using javascript/html

I'm fairly new to html so basically I have an Iframe and I want it to auto click a specific location when a user enters a website. I want it physically click the google search button Is it possible to give a location for a click? If so it would be helpful to display some code. This is what i got so far.
<html>
<iframe src="http://www.google.com" width="700" height="500" frameborder="1">
<p>Your browser does not support iframes.</p>
</iframe>
</html>
Assuming you can load www.google.com into an iframe, you might try adding a query string onto the end of the URL.
Something like https://www.google.com/#q=my+search+criteria
The user doesn't click anything, but search results are loaded (assuming Google will let you load its website in an iframe).

Fancybox iframe popup when site is loaded via another domain using iframe

I have a member-site that is operational.
That sites uses fancybox iframe "pop-up" and all works well. Now I want to allow webmasters to connect to member area via iframe and everything works well, but I am just curious if I can make fancybox popup overlay to go all over the browser instead of just "iframe" on user-domain....
To make it more clear my site resides on www.MyScriptDomain.com and there, when fancybox popup is triggered - overlay covers entire browser viewport.
Now if on www.SomeOtherDomain.com my member site is called via iframe like this:
<iframe name="inlineframe" src="http://MyScriptDomain.com/index.php" frameborder="0" scrolling="auto" width="980" height="500"></iframe>
when fancybox popup is triggered overlay pop out, but it covers only area of 980px / 500px, so is there a way to make nice integration, so it will actually cover entire browser viewport ?

Refresh an Iframe Once Upon Page Load

I have a cross browser iframe that is working minus one small detail. The initial frame load does not re-size all the way. So items are cut off at the bottom of the screen. It re-sizes perfectly if the frame is refreshed.
Is there a way to refresh an iframe once on the page load?
Example is here:
http://www.aans.org/aansmarketplace.aspx
goto multimedia products and select dvd. You will notice content cut off at the bottom of the screen...but if you reload the frame all of the content shows.
<iframe id="iframe" src="empty_script.php" />
<script>
$(function(){
$("#iframe").attr('src', 'your_Script.php');
});
</Script>
How are you resizing the iframe? If you have access to iframe containing page use onload event of iframe, calculate the inner document height and set it to iframe. This works perfectly fine in all browser.

Categories