[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Opening XSL output in a new window through browser

Subject: Opening XSL output in a new window through browser
From: "Vishnu Vardhan P" <pv.vardhan@xxxxxxxxx>
Date: Thu, 17 May 2007 15:37:28 -0400
 Opening XSL output in a new window through browser
Hi All,

I am using XSL and Javascript for rendering an HTML page. The dynamic
page depends on the user selection of menu(Menu is written in
javascript). I am passing the selected menu value from Javascript to
XSL for page rendering. The value has been passed successfully to XSL
and I can see the result.

Please see the below code..
function SelectedMenu(menu_selected, toplevel)
  Menu_Selection = toplevel;
   if(toplevel != 1)     // If toplevel=1 it should not go anywhere
    var xslt = new ActiveXObject(" Msxml2.XSLTemplate");
    var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument");
    var xslProc;
    xslDoc.async = false;
    xslDoc.resolveExternals = false;
    xslDoc.load ("example.xsl");
    xslt.stylesheet = xslDoc;
    var xmlDoc = new ActiveXObject("Msxml2.DOMDocument");
    xmlDoc.async = false;
    xmlDoc.resolveExternals = false;
    xmlDoc.load ("installedtools.xml");
    xslProc = xslt.createProcessor();
    xslProc.input = xmlDoc;
    xslProc.addParameter("menuselected", Menu_Selection);
    document.write (xslProc.output);

and XSL code is as follows..

  <xsl:output method="html"/>
   <xsl:param name="menuselected"/>
       <xsl:template match="/">

and somewhere in the code I am using menuselected variable as follows.

<xsl:for-each select="/ServiceConsole/Tool">
 <xsl:if test="Id=$menuselected">

Based on the menuselected value particular page details will display.

If I click on menu link the result is fine.The problem is that, if I
open link in another window through browser functionality "Open in New
Window" I am not able to see the result. Somehow I pointed out the
problem is because of document.write. If I remove that stement from js
file the result is completely gone. not even seen in the same page

Can any one please help me to fix this issue. I am very much thankful
if any one could point out the problem and let me know the process.


Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.