|
Subject: RE: [xsl] Dynamic creation of frames & the data within From: "Chris Bayes" <Chris@xxxxxxxxxxx> Date: Thu, 28 Dec 2000 22:51:03 -0000 |
Linda,
Can't remember exactly for Netscape. Probably
frames.main.document.open("text/html", "replace")
or
frames["main"].document.open("text/html", "replace")
Both will work for IE too.
What won't work for Netscape is
var x = new ActiveXObject("Microsoft.XMLDOM");
var s = new ActiveXObject("Microsoft.XMLDOM");
Not unless the new version is more radical than it last looked like.
There is a plugin of the Transformix engine but I don't know what the status
of it is at the moment.
Ciao Chris
XML/XSL Portal
http://www.bayes.co.uk/xml
>-----Original Message-----
>From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Linda
>Santiago
>Sent: 28 December 2000 22:22
>To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>Subject: RE: [xsl] Dynamic creation of frames & the data within
>
>
>Thanks Chris for the info!
>
>So far it has worked with IE not Netscape:
>
>In Netscape this call has an error:
> document.frames("main").document.open("text/html", "replace")
>The error is:
> document.frames is not a function
>
>Should this be coded different for IE vs Netscape? Should I be using a
>specific version of Netscape or IE?
>
>Also, don't know about the other guy using my thread!
>
>Linda A Santiago
>ISX Development/T&M ISU
>Phone: (954) 938-3935, T/L 599-3935
>Fax: (954) 958-6970, T/L 599-6970
>E-Mail: lasantia@xxxxxxxxxx
>
>
>"Chris Bayes" <Chris@xxxxxxxxxxx>@lists.mulberrytech.com on 12/28/2000
>03:39:37 PM
>
>Please respond to xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>
>Sent by: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>
>
>To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
>cc:
>Subject: RE: [xsl] Dynamic creation of frames & the data within
>
>
>
>Linda,
>As a beginner I can see you had problems with these 2 explanations.
>Here is a frame html that will simply populate one frame.
>Save the following to demo.html and put your xmlfile.xml and xslfile.xsl
>files in the same place.
>DEMO.HTML-----------------------------------
><html>
>
><head>
><title>Example</title>
><script language="javascript">
>function populateFrames(){
>//debugger;
> var x = new ActiveXObject("Microsoft.XMLDOM");
> var s = new ActiveXObject("Microsoft.XMLDOM");
> x.async = false
> s.async = false
> x.load("xmlfile.xml");
> s.load("xslfile.xsl");
> var html = x.transformNode(s);
> var destination = document.frames("main").document.open("text/html",
>"replace");
> destination.write(html);
>}
></script>
></head>
>
><frameset onload="populateFrames()" rows="64,*">
> <frame name="header" scrolling="no" noresize target="main">
> <frame name="main">
></frameset>
>
></html>
>FINISH----------------------------------------
>
>This doesn't need any html src files in the frame because it opens the
>"main" frame document and writes the result of the transformation directly
>into it.
>var destination = document.frames("main").document.open("text/html",
>"replace");
>destination.write(html);
>If you have an html files loaded in the "main" frame then you could do this
>instead
>var destination = document.frames("main").document.body.innerHTML = html;
>It all depends on wether the result of your transform is a complete html
>page or just a fragment of html.
>
>Ciao Chris
>
>XML/XSL Portal
>http://www.bayes.co.uk/xml
>
>
>>-----Original Message-----
>>From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>>[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Linda
>>Santiago
>>Sent: 28 December 2000 19:39
>>To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>>Subject: RE: [xsl] Dynamic creation of frames & the data within
>>
>>
>>Being somewhat unfamiliar with javascript, I am unsure where the call to
>>innerHTML be made from. Is it from the html file that is creating the
>>frameset or in that specific frame that we want it to have dynamic data?
>>
>>Thanks for the info!
>>
>>Linda A Santiago
>>ISX Development/T&M ISU
>>Phone: (954) 938-3935, T/L 599-3935
>>Fax: (954) 958-6970, T/L 599-6970
>>E-Mail: lasantia@xxxxxxxxxx
>>
>>
>>"Gottesman, Elisheva" <egottesm@xxxxxxxxxx>@lists.mulberrytech.com on
>>12/19/2000 12:06:14 PM
>>
>>Please respond to xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>>
>>Sent by: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>>
>>
>>To: "'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'"
><xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
>>cc:
>>Subject: RE: [xsl] Dynamic creation of frames & the data within
>>
>>
>>
>>you can create an html file for the frame (which you call in your frameset
>>to load), giving the body and ID and leaving it empty-- as follows:
>><html>
>><head>
>></head>
>><body ID="doc_info" />
>></html>
>>
>>then you can write to the frame using javascript, as follows:
>>(depending on what frame you're in)
>><SCRIPT language="JavaScript1.2">
>><!--
>>parent.frames.frame_id.doc_info.innerHTML = "dynamic_info";
>>-->
>></SCRIPT>
>>where frame_id is the frame ID attribute in your frameset, and doc_info is
>>the body ID attribute in the HTML file.
>>
>>> -----Original Message-----
>>> From: Linda Santiago [SMTP:lasantia@xxxxxxxxxx]
>>> Sent: Tuesday, December 19, 2000 11:32 AM
>>> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>>> Subject: [xsl] Dynamic creation of frames & the data within
>>>
>>> I am trying to create an page with 4 frames where one of the frames:
>>> <FRAME marginwidth="20" marginheight="0" NORESIZE src=(??? - dynamic
>>> data)>
>>>
>>> The only way we've found to include dynamic data in SRC is:
>>> <FRAME marginwidth="20" marginheight="0" NORESIZE src="javascript:
>>> '<HTML> . . . </HTML>'"
>>>
>>> Is there a better way to do this? Or another way to do this?
>>>
>>> Linda A Santiago
>>> ISX Development/T&M ISU
>>> Phone: (954) 938-3935, T/L 599-3935
>>> Fax: (954) 958-6970, T/L 599-6970
>>> E-Mail: lasantia@xxxxxxxxxx
>>>
>>>
>>> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>>
>> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>>
>>
>>
>>
>> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Dynamic creation of frame, Linda Santiago | Thread | Re: [xsl] Dynamic creation of frame, Jiri Jirat |
| RE: [xsl] Dynamic creation of frame, Linda Santiago | Date | Re: [xsl] Page-break/Static content, Paul Grosso |
| Month |