473,378 Members | 1,393 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,378 software developers and data experts.

Accessing a div in parent of an iframe

Hi,

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

<div name="searching" id="searching"
style="width:100px;display:block;float:left">Searc hing...</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

Apr 3 '06 #1
1 1739
on*******@gmail.com wrote:
I have a page which has a div tag like following:

<div name="searching" id="searching" ^^^^^^^^^^^^^^^^ style="width:100px;display:block;float:left">Searc hing...</div>
<URL:http://validator.w3.org/>
Now i have an iframe, which also has some javascript.

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

top.searching
<URL:http://jibbering.com/faq/#FAQ4_8>
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>
<URL:http://jibbering.com/faq/#FAQ4_43>
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
Apr 3 '06 #2

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

Similar topics

1
by: BGMeshi | last post by:
Hi, The following javascript code (serving a main HTML page) dynamically creates IFRAME to contain other HTML page. Everyting works OK, however when I am trying to access the main HTML page...
4
by: Paul Brant | last post by:
Hi all, I have a page with an IFRAME in it. From a script in the main ( parent ) page I instruct the IFRAME to load a specific URL. The URL contains parameters that are processed by the server....
2
by: Jeronimo Bertran | last post by:
Hi, I have a page with a very data intensive grid which needs to be automatically refreshed constantly if a change is detected. In order to not refresh the complete page so often, I created an...
19
by: k.karthikit | last post by:
Hello all, In some hidden variable (<input type="hidden" name="hiddenId" value="test" /> ,i stored some value.I accessed the value "test" using var id = document.getElementById( 'hiddenId' );...
14
by: Aaron Gray | last post by:
Hi, I want to access the properties of an IFrame but seem unable to get access to the IFrames document body. <html> <body> <iframe src="test.html" id="IFrame"></iframe> </body>
1
by: karthickdevi | last post by:
Hi, I have a selection list in my form. I also have an iframe in this document. I am trying to access the selection list from my iframe as given below. It works in Firefox but not in IE. ...
4
by: Jayyde | last post by:
Is there any way to capture a button click inside an iFrame and perform both an action on that page and one on the parent page? Basically I have a page atm that allows the user to add a record to...
4
by: irfan2irfan | last post by:
Hi, I am trying to access a TreeView Control from IFrame containing B.aspx. So the TreeView control is on the Parent page that contains the IFrame with B.aspx. From B.aspx (Iframed) i want to...
5
Jezternz
by: Jezternz | last post by:
Simple enough, I want to access the body of an iframe from the parent window. The thing that makes this hard is I create the iframe dynamicly, aparently some of the methods I have been using only...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: 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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.