Accessing a div in parent of an iframe

O

onali1811

Hi,

I have a page which has a div tag like following:

<div name="searching" id="searching"
style="width:100px;display:block;float:left">Searching...</div>

Now i have an iframe, which also has some javascript.

i try to access this div from the iframe using the following:

top.searching

It seems to work fine in IE, but am having problem in netscape 7.2

any solutions?

On Ali
 
T

Thomas 'PointedEars' Lahn

I have a page which has a div tag like following:

<div name="searching" id="searching" ^^^^^^^^^^^^^^^^
style="width:100px;display:block;float:left">Searching...</div>

Now i have an iframe, which also has some javascript.

i try to access this div from the iframe using the following:

top.searching

It seems to work fine in IE, but am having problem in netscape 7.2

<URL:http://www.jibbering.com/faq/faq_notes/pots1.html>
any solutions?

(Almost) standards compliant:

window.parent.document.getElementById("searching")

IE4-proprietary:

window.parent.document.all["searching"]

NS4-proprietary:

window.parent.document.layers[...]

<URL:http://pointedears.de/scripts/test/whatami#inference>.


PointedEars
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top