[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl]pass a parameter from the URL using Javascript


Subject: RE: [xsl]pass a parameter from the URL using Javascript
From: "David Petersen" <david@xxxxxxxxxxxxxx>
Date: Wed, 2 Apr 2003 11:34:19 -0600

I hope I understand what you want.  This is one way to pass parameters
to XSL files via JavaScript on the client.
	
	USING MSXML 
	
	This doesn't have all the details but this is a roadmap:

	1.  Create a new MSXML2.XSLTemplate.3.0
	2.  The template has a "createProcessor" method.
	3.  Create a processor and then you can use the AddParameter
method.
	
processor.addParameter(ParameterNameString,ParameterValue);
	4.  Once all the parameters are added,you can then transform the
data.
		processor.input=srcDoc;
		processor.output=resultDoc;
		processor.transform();
		
		//output
		mydiv.innerHTML=resultDoc.xml;
	5.  All this is done on the client in JavaScript using an
ActiveX component. If you wanted to do this on the server, then you
would need a server-side scripting engine like PHP or ASP.

	MSDN has numerous examples in their library.

Hope this helps.

David Petersen


-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Leonidas
Kanellos
Sent: Wednesday, April 02, 2003 10:42 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl]pass a parameter from the URL using Javascript




I am using the micrisoft's MSXML parser and IE 6 to desplay my results!

I am using XMLSPY 5 as well but not for much more cause is a tryal
version.

language or framework? Sorry but what do you meen by that?

I want to use javascript because it make the pages more independant.

Probably i am going to use Apache server to see if the page working
properly



Leo




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords
xsl