R
Richard P
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 getElementsByName.
<frameset rows="50,50" id="fsMain">
<frame id="frame1" name="frame"
src="page.asp?xml=frame1&xsl=frame1"/>
<frame id="frame2" name="frame"
src="page.asp?xml=frame2&xsl=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.frameGot() );
//******************
// this works in netscape and IE but only returns the window title,
// I want to run a function.;
//var objFrame = frameGet('frame2');
//if ( objFrame.contentDocument )
//{
//var src_doc = objFrame.contentDocument;
//alert(src_doc.title);
//}
//else
//{
//alert('no content')
//}
//******************
//None of these work.
//var objFrame = frameGet('frame2');
//objFrame.contentDocument.document.head.frameGot() );
//objFrame.contentDocument.head.frameGot() );
//objFrame.contentDocument.frameGot() );
//objFrame.contentWindow.document.head.frameGot() );
//objFrame.contentWindow.head.frameGot() );
//objFrame.contentWindow.frameGot() );
//alert(doc.frameGot() );
//alert( parent.window.frames['frame2'].frameGot() );
//alert( parent.frames['frame2'].window.frameGot() );
//alert( objFrame.frameGot() );
Any ideas?
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 getElementsByName.
<frameset rows="50,50" id="fsMain">
<frame id="frame1" name="frame"
src="page.asp?xml=frame1&xsl=frame1"/>
<frame id="frame2" name="frame"
src="page.asp?xml=frame2&xsl=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.frameGot() );
//******************
// this works in netscape and IE but only returns the window title,
// I want to run a function.;
//var objFrame = frameGet('frame2');
//if ( objFrame.contentDocument )
//{
//var src_doc = objFrame.contentDocument;
//alert(src_doc.title);
//}
//else
//{
//alert('no content')
//}
//******************
//None of these work.
//var objFrame = frameGet('frame2');
//objFrame.contentDocument.document.head.frameGot() );
//objFrame.contentDocument.head.frameGot() );
//objFrame.contentDocument.frameGot() );
//objFrame.contentWindow.document.head.frameGot() );
//objFrame.contentWindow.head.frameGot() );
//objFrame.contentWindow.frameGot() );
//alert(doc.frameGot() );
//alert( parent.window.frames['frame2'].frameGot() );
//alert( parent.frames['frame2'].window.frameGot() );
//alert( objFrame.frameGot() );
Any ideas?