iframe

How do I dynamically set source of an IFrame?

◇◆丶佛笑我妖孽 提交于 2019-12-19 08:30:08
问题 I have an IFrame embedding a youtube video. I want to create a textbox where user (admins) can paste a new src (URL) of video and the IFrame take the new source. Here is what I have so far: protected void Edited_Click(object sender, EventArgs e) { // HtmlControl frame1 = (HtmlControl)this.FindControl("frame1"); string url = TextBox1.Text; frame1.Attributes["src"] = url; } And in the html code is the Iframe: <div id="video"> <iframe title="YouTube video player" runat="server" width="420"

Browser busy indicator when loading data

核能气质少年 提交于 2019-12-19 07:23:27
问题 I'm trying to achieve what has been explained here. I am trying to load some data from server to the client side using dynamic script tags. (i.e I create a script tag, set its src to my JSON controller and append it to my head or body tag). the script loads correctly with the data returned from server. But during the script load, the browser doesn't display busy indicator (tried with Chrome/Firefox) (while according to this reference (page 35), this should be the default behavior). Also I

how remove horizontal scroll bar for iframe on google chrome

左心房为你撑大大i 提交于 2019-12-19 06:56:40
问题 I want to have vertical scrolling enable and horizontal scrolling off. using scrolling="no" is not what i want since i still want the vertical scrolling. I've tried adding this to css #myiframe{ overflow-x:hidden; overflow-y:auto; } but it still shows the horizontal-scroll bar for chrome only. the rest of the browsers are fine. any help is appreciated 回答1: If you have access to iframe source page you can place body { overflow-x:hidden; } inside of that page. If you don't, but at least pages

Setting iFrame CSS to display:none during load

醉酒当歌 提交于 2019-12-19 05:44:28
问题 I have this: <div class="upload_slide"> <iframe class="upload_iframe" style="visibility:hidden;"></iframe> </div> If I then post some files to the iFrame and set .upload_slide to display:none; , while it's loading, will this affect the loading of the iFrame or the detection of when it finished loading? 回答1: No, the iFrame's loading and load detection should not be compromised by setting the display to none. CSS is just for style, it has no ability to affect the DOM. 回答2: There shouldn't be a

How to mute an iframe?

安稳与你 提交于 2019-12-19 05:35:32
问题 I need to mute an iframe, but I don't know how to do it. Here is an example of what I have: http://www.codecademy.com/en/bitAce74593/codebits/nW7U9b Here you can hear the music from the website on the iframe, I need to automatically mute that audio. Hope that someone knows how to do it. Thanks 回答1: you can mute it by js, example: just put this in your page: <script type="text/javascript"> myVid=document.getElementById("video1"); myVid.muted=true; </script> you should replace "video1" by the

Selenium WebDriver: How to wait for iFrames to load completely?

送分小仙女□ 提交于 2019-12-19 05:14:52
问题 I'm testing a page with an iFrame whose contents are generated by JavaScript dynamically. I have to wait for the iFrame loaded completely to make sure that all the elements are present. I tried the following code, it didn't work. WebDriver frame = wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt("frmMain")); I also tried to wait for some element in the iFrame to be present. It didn't work, neither. Any help would be greatly appreciated, thanks! 回答1: Select any element on IFrame

Trying to render iframe: ancestor violates the following Content Security Policy directive: “frame-ancestors 'none'”

China☆狼群 提交于 2019-12-19 05:12:20
问题 I would like to render an iframe with the source being Github like so: <iframe src="https://gist.github.com/user45445/9bf8d568e3350146ba302d7d67ad576f"> </iframe> This is the error I get in the console: Refused to display 'https://gist.github.com/fresh5447/9bf8d568e3350146ba302d7d67ad576f' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'none'". I was researching how to specify my Content Security Policy in my Node server, to specify

iframe嵌套页面的跳转方式

主宰稳场 提交于 2019-12-19 05:09:38
一、背景 A,B,C,D都是jsp,D是C的iframe,C是B的iframe,B是A的iframe,在D中跳转页面的写法区别如下。 二、JS跳转 window.location.href、location.href 本页面跳转,D页面跳转 parent.location.href 上一层页面跳转,C页面跳转 top.location.href 最外层页面跳转,A页面跳转 三、链接或者form D页面中有form <form>: form提交后D页面跳转 <form target="_blank">: form提交后弹出新页面 <form target="_parent">: form提交后C页面跳转 <form target="_top"> : form提交后A页面跳转 四、刷新 parent.location.reload():C页面刷新 window.opener.document.location.reload():C页面刷新(使用子窗口的opener对象来获得父窗口对象) top.location.reload():A页面刷新 知识点转自http://blog.csdn.net/yuling59520/article/details/5630766 虽然现在iframe用的较少,但是一些管理系统里还是会用到,今天项目里就遇到一个很奇怪的bug,layer弹出层是一个新页面

Why Scrapy returns an Iframe?

那年仲夏 提交于 2019-12-19 05:08:30
问题 i want to crawl this site by Python-Scrapy i try this class Parik(scrapy.Spider): name = "ooshop" allowed_domains = ["http://www.ooshop.com/courses-en-ligne/Home.aspx"] def __init__(self, idcrawl=None, proxy=None, *args, **kwargs): super(Parik, self).__init__(*args, **kwargs) self.start_urls = ['http://www.ooshop.com/courses-en-ligne/Home.aspx'] def parse(self, response): print response.css('body').extract_first() but i don't have the first page, i have an empty iframe 2016-09-06 19:09:24

Deprecating FBML

久未见 提交于 2019-12-19 04:44:11
问题 As you probably already know (or read quote at the end of this post), Facebook is deprecating FBML in favor of iframes for developping applications. I am currently launching a new browser plug in and need a landing tab on my facebook page with personalized install buttons and all the useful features one can wish to have on a fan page. However, I cannot use an iframe in my page because Facebook forbids it (see SO related question here) and I am told not to use FBML because it is being