access outside element from within iframe

F

fkater

Hi,

inside an iframe (!) I've got links with "onmouseover=" calling
javascript functions. In these functions, how do I access elements from
the main window? Something like

document.getElementById("xyz")

would of course search inside the iframe only -- however "xyz" is the
Id of the body of the main window, so it is outside of the iframe. I
tried

window.document.getElementById("xyz")

but that does not work (always returnes NULL).

Thank You
Felix
 
F

fkater

Thanks for the links. However, I was talking about iframes, not frames.
Since iframes are not set inside a frameset things seem to be slightly
different.

FYI: I've not found a way to access functions of the main window from
inside the javascirpt code of the iframe. However, it is possible to
call the main window's javascript functions with something like
onmouseover="javascript:parent.myfunction();" from inside the iframe
html code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top