iframe

How to lazyload a iframe with caching in mind

℡╲_俬逩灬. 提交于 2019-12-22 06:45:50
问题 I used this method before. <iframe data-src="https://youtube.com/...?autoplay=1"></iframe> On event with javascript I turned the data-src to src and the video started to play. I had browser caching problems with that, videos autoplaying in background (I load a thumbnail in place for the actual iframe) when going back in the browser. Because of that I switched to a method where I just load the iframe inside a comment <!--<iframe src="https://youtube.com/...?autoplay=1"></iframe>--> and then

Javascript new window for video not resizing in IE

戏子无情 提交于 2019-12-22 06:28:43
问题 I have the following code for a javascript pop-up window that embeds a youtube video on my website. <script language="JavaScript"> function openAndroid22Window() { NewWindow=window.open("http://v4m.mobi/php/video_demo_frame.php? vid=http://www.youtube.com/embed/1-VsX8qMVFo?rel=0&width=640&height=510", "awindow","width=668,height=548,scrollbars=yes"); } </script> <li><a href="javascript:openAndroid22Window()">Installation on Android</a></li> The problem is that in all browsers, except IE, the

Javascript new window for video not resizing in IE

三世轮回 提交于 2019-12-22 06:28:03
问题 I have the following code for a javascript pop-up window that embeds a youtube video on my website. <script language="JavaScript"> function openAndroid22Window() { NewWindow=window.open("http://v4m.mobi/php/video_demo_frame.php? vid=http://www.youtube.com/embed/1-VsX8qMVFo?rel=0&width=640&height=510", "awindow","width=668,height=548,scrollbars=yes"); } </script> <li><a href="javascript:openAndroid22Window()">Installation on Android</a></li> The problem is that in all browsers, except IE, the

How to simulate Chrome/Safari border around active input or textarea on other elements such as divs or iframes?

房东的猫 提交于 2019-12-22 05:37:16
问题 I was using simple textarea element and then replaced it with iframe with designMode='on' to give user the possibility to mark some text and make it italic. But I still want an iframe to look like textarea, so I need a border around it similar to that which appears in Chrome and Safari when textarea is active. How can I achieve such an effect? 回答1: You can get the rounded outline in webkit like this: outline: 2px auto red; Notice that the width of the outline will not obey the specified width

Laravel refusing to display in iFrame as “'X-Frame-Options' to 'SAMEORIGIN'.”

徘徊边缘 提交于 2019-12-22 05:32:03
问题 So I have built a form in Laravel and am hosting externally but I want to display this within a HTML page but am having issues with the X-Frame-Options. The exact error message is: Refused to display 'url' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'. I have seen on previous StackOverflow answers that this is due to FrameGuard Middleware but this has since been removed and the issue line of code is not in that file. Laravel Version 5.3. I have also tried to set the X-Frame

Chrome extension: identify web requests of background-page iframe?

♀尐吖头ヾ 提交于 2019-12-22 05:29:13
问题 I'm writing a Chrome extension that periodically checks a web-page on the user's behalf. To be unobtrusive, the page is loaded into an iframe on the extension's hidden background page. Is it possible to identify just the web requests made by this iframe? My initial experiments (see below) seem to indicate that this is tricky. Getting all web requests for a particular tab is easy: you have the tabId, and can filter web requests (via the WebRequest API) with that tabId. But for a background

How can I detect when source of iframe is changed?

对着背影说爱祢 提交于 2019-12-22 05:22:08
问题 I want to detect when user clicks a link in iframe and changes the source of iframe , because I want to resize it. Also I use jQuery. What is the best way to detect this? Actually I need something like this (this example is in jQuery, it does not work, I imagined this) $('#iframe').live('load', function(){ alert('src is changed')}); 回答1: You may want to use the onLoad event, as in the following example: <iframe src="/test.html" onLoad="alert(this.contentWindow.location);"></iframe> The alert

How can I detect when source of iframe is changed?

╄→гoц情女王★ 提交于 2019-12-22 05:21:20
问题 I want to detect when user clicks a link in iframe and changes the source of iframe , because I want to resize it. Also I use jQuery. What is the best way to detect this? Actually I need something like this (this example is in jQuery, it does not work, I imagined this) $('#iframe').live('load', function(){ alert('src is changed')}); 回答1: You may want to use the onLoad event, as in the following example: <iframe src="/test.html" onLoad="alert(this.contentWindow.location);"></iframe> The alert

SCRIPT70: Permission denied when adding options to select element from a recently closed iframe

青春壹個敷衍的年華 提交于 2019-12-22 05:13:43
问题 We are having issues when adding options to a select element from an iframe. The code works well in Chrome, Firefox and Opera, but in IE11 we get a "SCRIPT70: Permision denied" when trying to access the recently created option from the parent window. What we need is to add options to a select element choosing them from a list. The list is shown in a lightbox (with an iframe) and when an element is chosen, it has to be added to the select element and then the lightbox closed (and the iframe

Javascript Alert - Removing “The page at ??? Says”

做~自己de王妃 提交于 2019-12-22 05:06:26
问题 I have a form and I am using Javascript to validate the form so if you leave a field blank it will alert "Please fill in your Name". If I go to the link directly, it works perfectly. But this is kind of like a Widget so I am using an iFrame to embed it into other sites. When I embed it, and click Submit with an empty field it says: The page at http://www.example.com says: Please fill in your name Is there a way to get rid of that? 回答1: No, there isn't. It is an anti-phishing feature. If you