iframe

Inserting <script> into iframe with jQuery

岁酱吖の 提交于 2019-12-23 05:19:16
问题 I'm attempting to insert a snippet into an iframe through jQuery with the following: var snippet = "<script>document.writeln('test')</script>"; jQuery('<iframe />').appendTo('body').append(snippet); instead of writing "test" in the iframe, it overwrites the parent window. How can I make it so that the parent window gets the iframe with "test" inserted in it? 回答1: You should set the source of new windows and iframes to 'about:blank' if you want control over them. Then reference it by the

selenium webdriver element inside iframe is clickable but moveToElement results in MoveTargetOutOfBoundsError

假装没事ソ 提交于 2019-12-23 05:03:25
问题 I have a page with an iframe. Inside the iframe is a table. When the user moves the mouse over this table, some elements appear. I'd like to click one of those elements. I think some of my first steps should be to select the iframe, and then moveToElement(table). But this results in a MoveTargetOutOfBoundsError. The strange thing is that I'm able to select the iframe and click on the table. The click doesn't complain about the element's x,y coordinates but moveToElement complains. Why?

Can't change element from iframe generated by Chrome Extension

谁说我不能喝 提交于 2019-12-23 04:57:15
问题 I'm working on a Chrome Extension. For now, there is one content script which returns an XPath of clicked element. Another content script adds an iframe into the current html page. In this iframe there is a textarea field which should show the xpath of the element when user clicks on it. Unfortunately it does not work. The xpath is correctly generated (tested using console.log(path) but the command: $('#xh-bar').contents().find('#product-path').val('some_val'); Doesn't alter the textarea . Do

insert php variable at the end of url string with an iFrame

谁都会走 提交于 2019-12-23 04:53:41
问题 Here is what i've done so far but i just keep getting an error <?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?> <iframe src="http://www.madisonb2b.co.uk/stockenquiry.aspx?id=B8FxKDnJ%2bIdaPT1Nw5wo4r87qHuHcCQIPZzeUE%2fI36LIFOM%2bayBi2RSXHzIJS5Hj97JNSyYL80Q%3d&code=<?php {$product_model} ?>"</iframe> Any ideas? Thanks, Scott 回答1: <iframe src="http://www.madisonb2b.co.uk/stockenquiry.aspx?id

Creating a draggable object in a iFrame from outside

人走茶凉 提交于 2019-12-23 04:38:30
问题 My problem : I need to create draggable widgets (here it's a jslider for example) from outside the iframe. Both Container and iframe content are from the same origin. The problem is that jQuery is attaching the mousemove event on the wrong document object. http://jsfiddle.net/techunter/4pnxh Try moving the sliders, it can only move when the mouse trigger the events outside the iframe. Please help, I'm stuck here EDIT: JQuery listens to the click on the slider handle and on click event it

Progress Status in Android App with Iframe a Site

断了今生、忘了曾经 提交于 2019-12-23 04:38:08
问题 I am building one app for my online radio station with iframe the site. But how I will add a progress status or animation image so that it's start on loading & end after load the site ? Here is the code I am using now: package com.jibon.tarabradio; import android.annotation.SuppressLint; import android.app.Activity; import android.os.Bundle; import android.webkit.WebView; public class MainActivity extends Activity { @SuppressLint({ "SetJavaScriptEnabled", "NewApi" }) @Override protected void

Scroll PDF using JavaScript

柔情痞子 提交于 2019-12-23 04:37:31
问题 I found a similar question Scroll PDF embedded in HTML but didn't see an answer. Does anyone have any suggestions for how to manipulate a PDF displayed within an iframe? Similar to the previous post link, I'm trying to scroll the PDF when the iframe doesn't have the focus (the host page does). Thanks! 回答1: Actually there is an answer in the link You provided: Hardly. What you might be able to do is to put the iframe into a div with overflow: auto, and give the iframe a very large height value

How to put iframe in to canvas

丶灬走出姿态 提交于 2019-12-23 04:34:13
问题 Hello i have a little question. How can i put iframe with google map in to html ? <canvas id="google_map" width="600" height="400"> <iframe width="600" height="390" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src=""></iframe> </canvas> 回答1: you don't need to put map in the canvas try this.... <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div style="width: 100%; margin-top: 50px;"> <iframe src="https://www.google.com/maps/embed?pb

How to put iframe in to canvas

好久不见. 提交于 2019-12-23 04:34:00
问题 Hello i have a little question. How can i put iframe with google map in to html ? <canvas id="google_map" width="600" height="400"> <iframe width="600" height="390" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src=""></iframe> </canvas> 回答1: you don't need to put map in the canvas try this.... <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div style="width: 100%; margin-top: 50px;"> <iframe src="https://www.google.com/maps/embed?pb

How to display iframe by a Javascript snippet?

删除回忆录丶 提交于 2019-12-23 04:29:21
问题 I have seen some widgets online that gives the user the possibility of including a short Javascript snippet in their own page, which when executed displays an Iframe, like in the following example. <div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=APP_ID&xfbml=1"></script><fb:facepile></fb:facepile> How can I do this by myself - have a javascript on my server, that when called on a remote server, writes out an iframe or loads content into their page? 回答1: I