Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #9447
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail |
|---|---|
| Content-Type | text/plain; charset="ISO-8859-1" |
| Message-ID | <1930181.aqSPkdTlGX@PointedEars.de> (permalink) |
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Reply-To | Thomas 'PointedEars' Lahn <cljs@PointedEars.de> |
| Organization | PointedEars Software (PES) |
| Date | Tue, 20 Dec 2011 12:14:48 +0100 |
| User-Agent | KNode/4.4.11 |
| Content-Transfer-Encoding | 7Bit |
| Subject | Re: cross-scripting issue: use javascript/DOM on iframe loaded from different domain, how? |
| Newsgroups | comp.lang.javascript |
| References | <jcopb2$f24$1@dont-email.me> |
| Followup-To | comp.lang.javascript |
| MIME-Version | 1.0 |
| Lines | 41 |
| NNTP-Posting-Date | 20 Dec 2011 12:14:50 CET |
| NNTP-Posting-Host | 50c5891a.newsspool2.arcor-online.net |
| X-Trace | DXC=ENRNS<3JPM\=>bdbdS?M0YA9EHlD;3YcR4Fo<]lROoRQ8kF<OcfhCO[L5NU2=\P19ZDZm8W4\YJN\;?f@h5gMfb\m>IFKdLPRgS;EmcMGB5ST[ |
| X-Complaints-To | usenet-abuse@arcor.de |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.javascript:9447 |
Followups directed to: comp.lang.javascript
Show key headers only | View raw
Mike S wrote:
> I have a page that contains an iframe which loads a page from a
> different domain that I do not control. The iframe includes the
> following select:
>
> <select name="promo">
> <OPTION value="NONE" selected>NONE</OPTION>
> <OPTION value="AAA">AAA</OPTION>
> </select>
>
> I would like to be able to select AAA using javascript on the parent
> page. I can work with the people who maintain the site that hosts the
> page loaded into the iframe, so I'm wondering if there is some way that
> they cold modify their page that would allow me to execute javascript on
> it from my parent page?
There is no "javascript" [1]. STFW for "Same Origin Policy".
> Would including window.domain="mydomain.ext" in
> the iframe page, where mydomain.ext is the domain hosting the parent
> page, allow me to access the iframe DOM with javascript?
No. It would be `document.domain', and it would not work everywhere; in
particular in would not work if the second-level domain of your site was
completely different from the second-level domain of the target site [2].
It is also in another way unreliable: the `domain' attribute of the
HTMLDocument interface of W3C DOM Level 2 HTML that the object referred to
by `document' implements, is specified as read-only [3].
PointedEars
___________
[1] <http://PointedEars.de/es-matrix>
[2] <https://developer.mozilla.org/en/DOM/document.domain>
[3] <http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268>
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
cross-scripting issue: use javascript/DOM on iframe loaded from different domain, how? Mike S <mscir@yahoo.com> - 2011-12-19 17:44 -0800
Re: cross-scripting issue: use javascript/DOM on iframe loaded from different domain, how? "Evertjan." <exjxw.hannivoort@interxnl.net> - 2011-12-20 08:18 +0000
Re: cross-scripting issue: use javascript/DOM on iframe loaded from different domain, how? Arno Welzel <usenet@arnowelzel.de> - 2011-12-20 10:14 +0100
Re: cross-scripting issue: use javascript/DOM on iframe loaded from different domain, how? Bart Van der Donck <bart@nijlen.com> - 2011-12-20 01:50 -0800
Re: cross-scripting issue: use javascript/DOM on iframe loaded from different domain, how? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-12-20 12:14 +0100
Re: cross-scripting issue: use javascript/DOM on iframe loaded from different domain, how? Martin Honnen <mahotrash@yahoo.de> - 2011-12-20 12:28 +0100
Re: cross-scripting issue: use javascript/DOM on iframe loaded from different domain, how? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-12-20 17:16 +0100
Re: cross-scripting issue: use javascript/DOM on iframe loaded from different domain, how? Mike S <mscir@yahoo.com> - 2011-12-23 17:18 -0800
Re: cross-scripting issue: use javascript/DOM on iframe loaded from different domain, how? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-12-28 14:50 +0100
Re: cross-scripting issue: use javascript/DOM on iframe loaded from different domain, how? Mike S <mscir@yahoo.com> - 2011-12-31 16:01 -0800
Re: cross-scripting issue: use javascript/DOM on iframe loaded from different domain, how? Bart Van der Donck <bart@nijlen.com> - 2012-01-02 00:47 -0800
csiph-web