473,664 Members | 3,035 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I've tried contentDocument , contentWindow and everything

I've feel that I have tried everything possible but I still cannot get
my code to work in both netscape version 6 and IE.

My Javascript is in XSL files but this should not matter.

I am using the frameset below, the ids are different but the names are
the same. The names are the same because I have a function to minimise
and maximise a frame given its name and this uses getElementsByNa me.

<frameset rows="50,50" id="fsMain">
<frame id="frame1" name="frame"
src="page.asp?x ml=frame1&amp;x sl=frame1"/>
<frame id="frame2" name="frame"
src="page.asp?x ml=frame2&amp;x sl=frame2"/>
</frameset>

In frame1 I have a function called 'testFrameGet'.

'testFrameGet' calls function frameGot that exists in frame2.

framegot displays an alert box.

So far I have tried:

//*************** ***
// The following line works in IE but not in Netscape.
// alert( parent.frames['frame2'].frameGot() );
//*************** ***
// this works in IE only.
alert( top.frame2.fram eGot() );
//*************** ***
// this works in netscape and IE but only returns the window title,
// I want to run a function.;
//var objFrame = frameGet('frame 2');
//if ( objFrame.conten tDocument )
//{
//var src_doc = objFrame.conten tDocument;
//alert(src_doc.t itle);
//}
//else
//{
//alert('no content')
//}
//*************** ***
//None of these work.
//var objFrame = frameGet('frame 2');
//objFrame.conten tDocument.docum ent.head.frameG ot() );
//objFrame.conten tDocument.head. frameGot() );
//objFrame.conten tDocument.frame Got() );
//objFrame.conten tWindow.documen t.head.frameGot () );
//objFrame.conten tWindow.head.fr ameGot() );
//objFrame.conten tWindow.frameGo t() );
//alert(doc.frame Got() );
//alert( parent.window.f rames['frame2'].frameGot() );
//alert( parent.frames['frame2'].window.frameGo t() );
//alert( objFrame.frameG ot() );

Any ideas?
Jul 20 '05 #1
1 7058


Richard P wrote:
I've feel that I have tried everything possible but I still cannot get
my code to work in both netscape version 6 and IE.

My Javascript is in XSL files but this should not matter.

I am using the frameset below, the ids are different but the names are
the same. The names are the same because I have a function to minimise
and maximise a frame given its name and this uses getElementsByNa me.

<frameset rows="50,50" id="fsMain">
<frame id="frame1" name="frame"
src="page.asp?x ml=frame1&amp;x sl=frame1"/>
<frame id="frame2" name="frame"
src="page.asp?x ml=frame2&amp;x sl=frame2"/>
</frameset>


I strongly suggest to use different names for different frames, then you
can access
parent.frames.f rameName
to access a frame cross browser

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

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

Similar topics

2
14287
by: Eric Pickup | last post by:
I'm having a problem with the following html (I've simplified it down to a simple test case). Could anyone point out why Mozilla is having problems with this (I've tried so many variations that I can't think of any more). In the actual code I have an if statement to handle IE but I need the code to work in Mozilla and IE. <HTML> <BODY> <IFRAME width="100" height="100" NAME="Composition" ID="Composition"> </IFRAME>
10
1653
by: lkrubner | last post by:
I killed last night and a good chunk of today trying to figure out this one particular attempt to get a class and initialize it. My code is using a class method called getObject to include() a file and then initialize the class in that file (one class per file, each file has the same name as the class). This code has been working fine for 8 months, and now is dying on this one line. Oddly, it is dying on the last return of this method. ...
5
22090
by: Dominic | last post by:
Hi everybody, My goal is to set the height of the iframe to fit its content. There was an earlier posting which gave some useful insights. http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=d2d855ea.0307060828.2965dfda%40posting.google.com&rnum=1&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26q%3DCalculating%2BIFrame%2Bsize The key idea is function getInnerHeight(iframe){
0
1018
by: KathyB | last post by:
Further to my earlier message tonight, here is more info on my button issue. I have two controls: a button and a textbox. This code for the button is in the page load (if not postback): btnList.Attributes.Add("onclick", "pop_window();return false;") it runs a simple script in <script> tags within the <head> of the
3
2746
by: nsh | last post by:
mailing.database.mysql, comp.lang.php subject: does "LOAD DATA" EVER work?!? I've tried EVERYTHING! version info: my isp is running my web page on a linux box with php ver. 4.4.1 according to phpinfo, the "mysql api client is ver. 4.0.25" - I have no idea how this relates, if at all, to the mysql engine's version. background:
2
2077
by: Bill | last post by:
I have a 200 record database that includes a date/time field, AnnivDate, for a wedding anniversary. AnnivDate has nulls and some incorrect year data. I have been creating the Access database using data imported from an Excel file and the person entering into Excel only cared about the month and day portion and Excel added the current year to the field value. I want to produce a report that shows upcoming anniversaries using a parameter...
0
1640
by: DebbieinTennessee | last post by:
I've recently (Dec) taken over a website for our club, and have been able to post everything I've tried to, pictures, hyperlinks, created new pages, EXCEPT, the heading, which shows when I have the page open in FrontPage 2003, will not show up on the website. it ishows up as a black box with a little white box containing a red x in the corner. I have tried and tried..... to no avail. any suggestions?When I open the web page .... previous titles...
0
8861
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8778
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8549
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8636
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6187
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4185
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2764
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2003
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1759
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.