Iframe is not displayed on Android devices in Chrome browser - javascript

You see, I have the following situation, I have an Iframe that is displayed on apple devices without problem, no matter the model, in desktop / pc it is displayed without problem, on android devices with any browser other than chrome is displayed correctly, now, with Android devices and chrome browser sometimes shows the IFrame and other times not, my IFrame is the following:
<iframe id="lgnIfra" width="100%" marginheight="0" marginwidth="0" onLoad="resize()" scrolling="no" frameborder="0" src="<%=path%>" align="bottom" iframe.src="javascript:parent.getFrameHTML()"></iframe>
Is there any way to load IFrame without any problem on Android devices and using chrome as a browser?
Update 1
I get next error in console:
Uncaught TypeError: Cannot read property 'scrollHeight' of null
This is my line in file .js
iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';
Any solution?

Related

iframe content in IE11 is shows only white screen

I need to display an pdf file in iframe tag using JavaScript
Here is my iframe
<iframe id="iframeFile" name="iframeFile" src="" width="100%" height="100%" title="File" scrolling="auto" style="position:relative;"></iframe>
$('#iframeFile').attr('src', '');
pdf is displaying in chrome and firefox. But in internet explorer it shows white blank screen.
Does it show the option to download the file when you try to open it in IE 11?
Try to check the Adobe Shockwave add on is installed and enabled in Internet Explorer.
If it is not available or disabled than IE can show you the blank screen and prompt you to download the PDF file to view it locally.
If it is not available in your IE add on list than you can download it from Adobe website.
Adobe Shockwave Player

Safari browser in Ipad renders only the first page of pdf - Javascript

The following code has been used to render the pdf in browser. It works fine in chrome browser but it doesn't work in Safari browser in ipad. It just renders the first page of pdf. Another observation is the first page is converted into image (as per the console)
<embed src={props.filePath} height="900" width="100%" type='application/pdf'/>

Why is youtube iframe causing "Loading failed for the <script> with source"

I am using youtube iframe for embeding on my site. Currently I am in local development, but if I use iframe from youtube, it will give me the error message in console:
Loading failed for the <script> with source “https://static.doubleclick.net/instream/ad_status.js”.
I dont have any adblockers on.
After the error, the rest of the page refuses to load and work correctly. For example, I had javascript loaders at the end of the page, those did not work/load, I have since moved them to the header and now that works. I am not doing anything magical, just including the iframe youtube has on their site right into the main page.
iframe usage:
<iframe width="560" height="315" src="https://www.youtube.com/embed/#" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe>
Which browser did you try?
I tried with firefox and chrome with the following results:
Firefox with AdBlock Plus: Loading failed
Firefox with ABP disabled (in the extensions page of Firefox): Worked
Chrome without ABP: Worked

Content inside iframe is invisible at IOS (Iphone & IPAD)

Hello following iframe code is not getting displayed at iPhone at all. It loads fine on other browsers and Android mobile browser. On Safari desktop browser, I need to specify
iframe onload=iFrameHeight(700) to make it displayed. However this still does not help for iPhone.
Any ideas?
Thank you.
<div class="contentpane"> <iframe onload="iFrameHeight()" id="blockrandom" name="iframe" src="http://www.maxhire.net/cp/?E5586A361E43515B79561C6532531A2604" width="100%" height="700" scrolling="no" align="top" frameborder="0" class="wrapper"> This option will not work correctly. Unfortunately, your browser does not support inline frames.</iframe> </div>

Internal Links within IFrame doesn't working in iphone safari browser

The source code is :
<iframe id="privacy-frame" frameborder="0"
src="http://www.cnn.com/partners/mobile/v2/privacy.policy/"
style="width: 100%; background-color:#fff">
</iframe>
When i try to browse the page http://mobile-demo.turner.com/election/tos.html in iphone the internal links doesn't work.
But if i try to browse the page with src URL(http://www.cnn.com/partners/mobile/v2/privacy.policy/) it works.
Is this some issue with iFrame on iphone? Same code does work on Android browser or desktop browser.

Categories