iframe

Prevent browser from prompting for file download when opening CSS file in iFrame?

懵懂的女人 提交于 2019-12-12 21:01:53
问题 I have a web app which loads an arbitrary page or file into an iFrame. Under some browsers, when pointing the iFrame's src to a css file, instead of displaying the css text, a "download/open file" prompt appears. Is there any way to prevent this? I understand the valid security reasons for not downloading or opening a non-text file by default, but a css file or any text/* filetype should be safe enough (safer than HTML in fact!) The css file's response header looks like the following: Content

Alert when iframe url changed

懵懂的女人 提交于 2019-12-12 21:00:03
问题 This script runs every 2 seconds and detect if the url of the iframe is changed. But I can't get it to work. I want to alert if the url of the iframe is changed. For example if someone clicks a link and go another page on the iframed content. var prevSrc = "http://www.bodrumlife.com"; function check() { var curSrc = $('#iframe').attr('src'); if (curSrc != prevSrc) { alert("hobaa"); prevSrc = curSrc; } } window.setInterval(check, 2000); // 2 seconds <iframe id="iframe" name="iframe" src="http:

Styling iframes

坚强是说给别人听的谎言 提交于 2019-12-12 20:42:01
问题 I'm trying to display two websites on an ASP.NET MVC page. The first website should appear in the upper 130 or so pixels, and the second website should use up all remaining vertical space. Both websites should use up the entire width of the browser. There is an example of what I want here, but it uses a frameset with <frame> tags, which are now deprecated. So I've started a jsFiddle to try and arrange two <iframe> tags instead. I've got most of it but am unable to have the second website use

Detect iframe src change using jquery

对着背影说爱祢 提交于 2019-12-12 20:18:01
问题 Lets say an <iframe> is initially loaded pointing to a certain src. The user clicks on a hyperlink and the contents of the iframe changes. I would like to detect that new src of the iframe in full. Unfortunately it appears to only provide the original src when a change is detected. It detects the change, just not what it changed to. Perhaps it is a browser-specific issue. I am using chrome. $(function(){ $('iframe').load(function() { var src = $("iframe").attr('src') alert(src); }); }); http:

Hover not working with iFrame in IE9

邮差的信 提交于 2019-12-12 19:28:19
问题 I'm using CSS3 MegaMenu, that uses jQuery. One of my dropdown menu items uses an iFrame to display a contact form hosted elsewhere. You can see here: http://www.deepdata.biz (it's the last item on the main nav bar to the right: 'Email') It works fine, except in IE9, the hover works to drop it down, but once the mouse enters the iFrame area, it disappears, making it impossible for the user to fill out the form. I've read that this is on purpose for security reasons- but there must be a way

Issue with Iframe inside JQuery dialog only for IE

三世轮回 提交于 2019-12-12 19:25:00
问题 I am facing very critical issue with my asp.net web application in which i have developed one page and loading that page using iframe inside Jquery dialog. in that i was getting errors related 'undefined object' and many subsequent errors when i am trying to open that in IE then after i did research and found that for IE we need to assign iframe src after open dialog as per this answer and i got solution at time of opening in IE now i am getting same errors when i am trying to close that

Enable Play/Pause when background is true in Vimeo video embed options

大城市里の小女人 提交于 2019-12-12 19:24:36
问题 With the help of following parameters we can hide title, line, logo but not like and add to watch later. title=0&byline=0&portrait=0 With the help of following parameters we can hide title, line, logo , like , add to watch later, play/pause and all other options but the video will be auto play and we can't pause the video. background=1 回答1: Unfortunately that is not currently possible using our player.js API. If you use the background parameter it is meant to be a typical background video

Alternatives to Iframe

六月ゝ 毕业季﹏ 提交于 2019-12-12 19:07:15
问题 I have been developing a service that allows users to insert information from my database onto their sites by using iframes. The only problem was that the iframe needs to be resizeable and this is one of the biggest problems with iframes as most people already know, aswell as the fact I can access objects on the parent page from within the iframe and vice versa. I have thought of making an asp.net web servie to server up the HTML and access it by using a get request. However this also has a

Displaying success/failure messages from hidden iframe submit

走远了吗. 提交于 2019-12-12 19:05:58
问题 I'm using the hidden iframe method to submit a form with a file upload field. I want to display a message back on the page using javascript and I'm not sure how to do this. If this was just a form with text fields I'd do an AJAX post and respond with a message I'd display in my callback function. I'm just not sure how to accomplish this same task with the hidden iframe method since it is a standard form post. 回答1: Inside the iframe, when your server responds after finishing the upload, you

Open PDF from Chrome IFRAME failed with default PDF viewer

家住魔仙堡 提交于 2019-12-12 18:48:24
问题 The code looks like: <iframe pm-attr-iframe class="widget-body" ng-src="{{vm.iframeUrl}}" sandbox="allow-same-origin allow-popups allow-forms allow-top-navigation"> (not available) </iframe> Click the PDF link inside the iframe, it opens with white content. If right click the mouse and click "Save", it works. If open the URL to any tab or window, the PDF file rendered with default PDF viewer. If I add other PDF viewer to Chrome extensions, it always works. Is it caused by default PDF viewer