xsl-list
[Top] [All Lists]

RE: pass a parameter from the URL using Javascript

2003-04-02 10:34:19
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(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of 
Leonidas
Kanellos
Sent: Wednesday, April 02, 2003 10:42 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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