iframe

need like foreach in jQuery to take all the divs from all the iframes

空扰寡人 提交于 2019-12-25 04:17:50
问题 so the code that extracts the div from the iframe is made by @Adil like this: $(window).load(function () { var filteredContents = $('.test').contents().find('.div_iframe').html(); $('.test').contents().find('body').html(filteredContents); }); HTML looks like this: <iframe class="test" width="100%" height="100%" src="/message.html?msjId=268" style="height:100%;width:100%;"> <iframe class="test" width="100%" height="100%" src="/message.html?msjId=260" style="height:100%;width:100%;"> and the

MS Crm 2011 javascript Iframe functions

偶尔善良 提交于 2019-12-25 04:16:29
问题 I'm facing a problem with an IFrame on MS CRM 2011. I'm trying to generate HTML code and write it into an IFrame. I'm quite new to CRM development so I hope you could guide me to a solution. After I generate the HTML content (IframeHTML) via JavaScript I try to write that content to an IFrame and then reload the whole Form. Everything is working fine until I reach my last command var control = document.getElementById("IFRAME_name"); control.contentWindow.document.open(); control.contentWindow

using jquery + <audio> w/ php/mysql to loop playback times

£可爱£侵袭症+ 提交于 2019-12-25 04:14:32
问题 I've got a page with an iframe . The iframe is using jquery.scrollTo to detect the audio playback time and keep the contents, lyrics for example, linked to the right point in the audio. Each line of text is being pulled from a mysql table. What I'm trying to do is to allow the user to click on a line in the <iframe> and have the audio in the parent page play at that point. Here's the code that grabs the times, which exists after the jquery that handles the other audio functions: <?php include

Finding child element from iFrame via getElementById or other technique?

核能气质少年 提交于 2019-12-25 04:10:57
问题 I have an iframe on my page, and need to get a child element from it whose ID I have. I'd like to do something like this: document.getElementById('iframeID').getElementById('child element ID') I'm open to suggestions on how to accomplish this. Unfortunately I don't have access to jQuery or other handy libraries on this page. 回答1: You first need to access the iframe document, here is a cross-browser way to do it: var ifr=document.getElementById('iframeID'); var doc=ifr.contentWindow||ifr

Copying text from IFRAME into the INPUT field on the parent page

只谈情不闲聊 提交于 2019-12-25 04:05:20
问题 When the visitor clicks the button after typing a text in the INPUT field which is in a framed page , is it possible to copy the typed text into the INPUT field which is on the parent page ? iframed page code : page1.html <form action=""> Search:<input type="text" name="searchname"><input type="submit" value="send" size="45"> </form> Parent page: <IFRAME id="iframe1" src="page1.html"></IFRAME><BR> You searched:<INPUT type="text" id="result"> I want that the searched items display on the

How to access C# class from Javascript

半世苍凉 提交于 2019-12-25 03:59:07
问题 I have a class named book in C#. In an ASPX page (which has access to book class), I have an iframe element. I want to use Javascript from the page in the iframe , to call book.write() , but I'm not sure if I can call a C# method from a page inside an iframe using Javascript. How I can do that? 回答1: You will have to make postback using javascript to the server with some parameters and then the server side can access the required class and function as per the parameter. 回答2: c# = server side,

ASP.NET Web Forms - Button not working inside <iframe> in IE9 and below

廉价感情. 提交于 2019-12-25 03:58:24
问题 I have an ASP.NET Web Forms page that has a form in it and I load it in an <iframe> as a popup. In all modern browsers it works great. In IE9 and below, however, things are weird. One file input element failed to open the file selection dialog when clicking on its browse button. After fixing this (with a JS trick), I saw another problem. Another button inside the form with this attribute for postback: onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("btnUpload", "

Redirecting child iframe to relative url, using js within iframe - but url is relative to the parent

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 03:54:27
问题 Some interesting behavior that I didn't expect. I have a page which contains an iframe, and in that iframe there's a javascript function that redirects its own window. I call the iframe's js function from the parent frame. My expected behavior is that it will redirect the iframe to a new page, relative to the iframe's existing location. Instead, it gets redirected relative to the parent frame's location. You can see a demo here: http://thedailynathan.com/files/outlink/parent/parent.html Am I

前端性能优化

纵然是瞬间 提交于 2019-12-25 03:52:58
客户端 一、减少HTTP请求数   1、合并JavaScript、CSS等文件   2、使用CSS Sprite:将背景图片合并成一个文件,通过background-image和background-position控制显示     3、字体图标   4、将请求划分到不同的域名上 二、减少DNS查询   用户输入URL后,浏览器首先要查询域名对应服务器的IP地址,一般需要耗费20到120毫秒时间。DNS查询完成之前,浏览器无法从服务器下载任何数据。首次访问、没有相应的DNS缓存,域名越多,查询时间越长。所以应尽量减少域名数量。但基于并行下载考虑,把资源分布到2个域名上(最多不超过4个)。 三、避免重定向   客户端收到服务器的重定向响应后,会根据响应头中 Location 的地址再次发送请求。重定向会影响用户体验,尤其是多次重定向时,用户在一段时间内看不到任何内容,只看到浏览器进度条一直在刷新。 四、缓存Ajax请求 五、延迟加载   1、非首屏使用的数据、样式、脚本、图片等;   2、用户交互时才会显示的内容。 六、预先加载   1、无条件预先加载:页面加载完成(load)后,马上获取其他资源。   2、有条件预先加载:根据用户行为预判用户去向,预载相关资源。 七、减少DOM元素数量   八、划分内容到不同的域名    九、尽量减少iframe使用   iframe优点    

node-phantom handle hyperlink of iframe fail

倖福魔咒の 提交于 2019-12-25 03:48:16
问题 Recently, i integrate node and phantomjs by phantomjs-node. I opened page that has iframe element, i can get the hyperlink element of iframe, but failed when i execute click on it. Do you have a way? Anyone can help me? example: page.open(url); ... page.evaluate(function(res){ var childDoc = $(window.frames["iframe"].document), submit = childDoc.find("[id='btnSave']"), cf = submit.text();//succeed return text submit.click()//failed return cf; },function(res){ console.log("result="+res);/