This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Dynamic creation of frames & the data within
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Dynamic creation of frames & the data within
- From: "Chris Bayes" <Chris at Bayes dot co dot uk>
- Date: Thu, 28 Dec 2000 20:39:37 -0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
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@lists.mulberrytech.com
>[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Linda
>Santiago
>Sent: 28 December 2000 19:39
>To: xsl-list@lists.mulberrytech.com
>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@us.ibm.com
>
>
>"Gottesman, Elisheva" <egottesm@lehman.com>@lists.mulberrytech.com on
>12/19/2000 12:06:14 PM
>
>Please respond to xsl-list@lists.mulberrytech.com
>
>Sent by: owner-xsl-list@lists.mulberrytech.com
>
>
>To: "'xsl-list@lists.mulberrytech.com'" <xsl-list@lists.mulberrytech.com>
>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@us.ibm.com]
>> Sent: Tuesday, December 19, 2000 11:32 AM
>> To: xsl-list@lists.mulberrytech.com
>> 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@us.ibm.com
>>
>>
>> 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