iframe

What is the HTTP Referer if the link is clicked in an <iframe>?

匆匆过客 提交于 2019-12-18 11:45:54
问题 Suppose I have a webpage located at http://www.website.com with an <iframe> in it. Like this: <html> <head>...</head> <body> ... <iframe src="http://www.washington.edu"> ... </body> </html> Now suppose someone goes to www.website.com and clicks a link in the iframe itself (this link is located on www.washington.edu website). My question is what is the HTTP Referer in this case? Is it http://www.website.com (the page hosting iframe) or is it http://www.washington.edu (the page in which the

Accessing iframes from a Chrome content-script extension

被刻印的时光 ゝ 提交于 2019-12-18 11:08:55
问题 I'm writing a Chrome extension that needs to alter a popular web app when loaded. Unfortunately, most of the UI of that web app is rendered inside an iframe, and although the address of that iframe matches my content_scripts match declaration, the user script only gets invoked for the top frame. Q: Is there a method of accessing HTML rendered inside an iframe from a Chrome content script extension? If yes, what permissions and other manifest options should I specify? Thanks. 回答1: I've

Uncaught DOMException: Failed to execute 'postMessage' on 'Window': An object could not be cloned

旧巷老猫 提交于 2019-12-18 10:47:17
问题 I'm trying to call parent.postMessage(obj, 'whatever'); from within an iframe and I'm getting this error: Uncaught DOMException: Failed to execute 'postMessage' on 'Window': An object could not be cloned. 回答1: It turns out the object I passed had methods, which is why the error message said An object could not be cloned . In order to fix this, you can do the following: obj = JSON.parse(JSON.stringify(obj)); parent.postMessage(obj, 'whatever'); 来源: https://stackoverflow.com/questions/42376464

Angular 2 iframe to parent communication

亡梦爱人 提交于 2019-12-18 10:42:53
问题 in my current project I have multiple Angular 2 applications which should be served by a portal application (also Angular 2). So the portal app has a header area with links to all underlying apps. When the user clicks on one app link, the corresponding angular 2 app gets loaded in an iframe of the portal body. Now I develop a central authorization service. In the portal I have a service which holds the permissions of the current logged-in user. My question is: Is it possible to access angular

Twitter OAuth via a popup

独自空忆成欢 提交于 2019-12-18 10:07:10
问题 I was wondering how to do twitter OAuth via a popup, i.e. load up the Oauth page in a popup and make the callback close the child window and reload the parent window. Edit: OK iframes are bad, but how would you accomplish the above, I notice posterous.com does this - I'm looking to achieve the same flow as FB connect. 回答1: Doing the same thing for Yahoo today... Open a popup Send user to twitter for authentication Twitter sends user back to mysite.com/authcompleted.php, with authentication

Widget - Iframe versus JavaScript

为君一笑 提交于 2019-12-18 10:00:42
问题 I have to develop a widget that will be used by a third party site. This is not an application to be deployed in a social networking site. I can give the site guys a link to be used as the src of an iframe or I can develop it as a JavaScript request. Can someone please tell me the trade offs between the 2 approaches(IFrame versus JS)? 回答1: I was searching about the same question and I found this interesting article: http://prettyprint.me/prettyprint.me/2009/05/30/widgets-iframe-vs-inline/

Error iframe html characters

[亡魂溺海] 提交于 2019-12-18 09:51:42
问题 excuse my English I speak Spanish I'm trying to display multiple php and mysql registration, after that the show in an iframe the problem is that apparently in the iframe shows me errors accents and other characters for example: for example (�D�nde cuesta menos y se consume m�s?") this is what shows (�) In the original query or first does not show me that, but in the iframe shows me that error What should I do? regards 回答1: "When a browser renders/parses a web document that does not have the

determine the frame id/name when a user has selected text in that frame- the page has multiple frames

不羁岁月 提交于 2019-12-18 09:48:40
问题 I have a scenario in which there are multiple iframes/frames open in one web page. Now user may select some text in any one of the open frames/iframes. I want to determine the id/name of the iframe in which user has selected text, using the iframe id/name I will then do some operations on the selected text. How do I do this? 回答1: This will get the first iframe in the curent document that has a non-empty selection. If an iframe is from another domain and hence inaccessible to JavaScript

javascript iframe link referrer

ぃ、小莉子 提交于 2019-12-18 09:24:26
问题 A page loads another domain in an iframe. If javascript inside the iframe clicks on a link in the iframe which domain will the referrer be? 回答1: Referer will be the page on which the link is clicked. In your case, it will be domain that is opened in iframe. 回答2: Unless it's IE6 - then it's the original page - strange? Ohh yes 回答3: It will obviously refer to the new domain. 来源: https://stackoverflow.com/questions/2324202/javascript-iframe-link-referrer

Generic solution of 'X-Frame-Options' to 'SAMEORIGIN' issue

ⅰ亾dé卋堺 提交于 2019-12-18 09:24:18
问题 I am trying to open http://teeSpring.com/ in an iframe. It is throwing Refused to display 'http://teespring.com/' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'. error. I have gone through multiple answers but none of it worked for me. Most of the solutions are specific to google-maps, facebook or youtube video. Here is my code: <html> <head> <base target="_blank" /> <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> </head> <body> <iframe src="http://teespring