This is a discussion on "having problems passing parameters to xsl stylesheet from javascript" within the Other Programming Languages section. This forum, and the thread "having problems passing parameters to xsl stylesheet from javascript are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
having problems passing parameters to xsl stylesheet from javascript
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
having problems passing parameters to xsl stylesheet from javascript
hi, i would like my javascript in jsp pass a parameter value to an xsl stylesheet, all looks ok but just doesnt work. the page displays nothing.
here is the javascript +++++++++++++++++++++++ <script type="text/javascript">// Load XML // Load XML var xml = new ActiveXObject("Microsoft.XMLDOM"); xml.async = false; xml.load("msg.xml"); // Load XSL var xsl = new ActiveXObject("Microsoft.XMLDOM"); xsl.async = false; xsl.load("sort.xsl"); // Transform var template = new ActiveXObject("MSXML2.XSLTemplate"); template.stylesheet = xsl; val processor = template.createProcessor(); processor.input = xml; processor.addParameter("sortKey", "author"); processor.transform(); //document.open(); //document.write(processor.output); //document.close(); document.write(xml.transformNode(xsl));</script> ++++++++++++++++++ and the xsl file +++++++++++++++++ ............ <xsl:for-each select="messageboard/message"> <xsl:sort select="$sortKey" order="ascending"/> <li> <a> <xsl:attribute name="href">display.jsp?msgid=<xsl:value-of select="@id"/></xsl:attribute> <xsl:value-of select="subject"/> ................ +++++++++++++++++ any help pls?thanks |
|
|
|
|||
|
Re: having problems passing parameters to xsl stylesheet from javascript
no error messages?
|
![]() |
| Tags |
| having, problems, passing, parameters, xsl, stylesheet, javascript |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CSS Stylesheet Switcher Problems | Jack Franklin | JavaScript Forum | 12 | Dec 21st, 2007 00:23 |
| Javascript navigation problems | mikka23 | JavaScript Forum | 8 | Sep 30th, 2007 12:22 |
| Javascript problems | anthwinter | JavaScript Forum | 1 | Mar 19th, 2007 16:48 |
| Javascript & CSS Problems | magfrag | Web Page Design | 2 | Mar 17th, 2007 10:17 |
| CGI page loads only halfway, parameters causing problems | k.n. | PHP Forum | 3 | May 13th, 2005 01:40 |