473,387 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

editing the dom of a webpage from an iframe?

Say page A included an iframe to page B and that I wanted page B to
modify page A's DOM. How might I go about doing this?

opener.document.* works for popup windows.... might it work for
iframes, as well?

Aug 22 '06 #1
5 1387


yawnmoth wrote:
Say page A included an iframe to page B and that I wanted page B to
modify page A's DOM. How might I go about doing this?
If B is in a frame then
parent
will give you the parent window
parent.document
the document object in the parent window.

If someone loads your page B into a browser window of its own then
parent is the same as window i.e.
parent === window

--

Martin Honnen
http://JavaScript.FAQTs.com/
Aug 22 '06 #2
You may find this helpful:

http://groups.google.com/group/comp....7bf657bb6a1e92

Aug 22 '06 #3
Tom Cole wrote:
You may find this helpful:
http://groups.google.com/group/comp....7bf657bb6a1e92
Urrmm... the man wrote that article himself :-)

--
Bart

Aug 22 '06 #4
Martin did, but not yawnmouth...

yawnmouth said "iframe", Martin read "frame". So I thought it was
relevant.

Bart Van der Donck wrote:
Tom Cole wrote:
You may find this helpful:
http://groups.google.com/group/comp....7bf657bb6a1e92

Urrmm... the man wrote that article himself :-)

--
Bart
Aug 22 '06 #5
Tom Cole wrote:
Martin did, but not yawnmouth...
Did what? Please do not top-post to comp.lang.javascript.
yawnmouth said "iframe", Martin read "frame". So I thought
it was relevant.
<snip>

When the tree-like hierarchy of frames is being navigated (through the -
frames - collection, the - top - and - parent - properties of the
window/frame/global objects involved) the distinction between "frame"
and "iframe" is non-existent.

Richard.
Aug 22 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: TonyJeffs | last post by:
The following gimmicky code shows the icons of the recipients desktop on a webpage, provided hes using ie, and c:/windows/desktop. The trouble is ,it shows them in a column down the left of the...
8
by: brett | last post by:
How can I find the height and width of a webpage? Say I want to make sure someone's webpage is within an 800X600 viewing area. Width is the most important but if I can get width, I should also be...
22
by: Ruslan Kogan | last post by:
Hi, I have a webpage with a table that has 4 cells (2x2). In one of those cells, I wish to load a webpage stored on a different server (say...www.webpage.com/abc.htm). Does HTML allow for this...
3
by: Erik | last post by:
I've found several posts discussing this, but I'm still stumped. Pasted below is the HTML for a simple aspx file I created in a 1.1 environment. My goal is to give my users a rich text editor,...
6
by: eureka | last post by:
Hi friends, I am developing a web application using Jsp and JS. I have a main Jsp page(Jsp1).Inside it I have an iframe having an Html- table which is created dynamically and contains all...
4
by: bushi | last post by:
hi! i'm designing a web application,basically it have two pages,"client_browser.apsx" & "adserver.aspx"."client_browser.aspx" contains an iframe,and in the iframe i have displayed my...
9
by: pvsundarram | last post by:
hey, i am trying to cancel the keydown event for certain keycodes( for eg:- enter key ).But the cancelling of this event is not happening in firefox. Is there any way to cancel the event in the...
3
by: tullyrob | last post by:
If you run the following simple line of code in Mozilla the webpage loads fine. However, a default page is displayed when opened in IE. --- <html> <iframe name=stbbox...
14
by: jim | last post by:
OK...Don't ask why - it'll just make ya mad. It makes me mad just thinking about it. I swear....if I didn't need this job, I'd tell 'em where to embed their webbrowser control. But, since I do...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.