vikram176 Posted July 2, 2011 Share Posted July 2, 2011 Hi, I am unable to display the xsl output in a popup. The same code is working fine when displaying in the same page. Please help.Sample XML: <?xml version="1.0" encoding="UTF-8"?><TotalInterests> <InterestCategory> <InterestCategoryName>.NET Technologies</InterestCategoryName> <InterestCategoryID>.NET Technologies_ID</InterestCategoryID> <TopInterests> <TopInterestsName>C sharp Technology</TopInterestsName> <TopInterestsID>C sharp Technology_ID</TopInterestsID> </TopInterests> <TopInterests> <TopInterestsName>ASP.NET Technology</TopInterestsName> <TopInterestsID>ASP.NET Technology_ID</TopInterestsID> </TopInterests> <TopInterests> <TopInterestsName>Sharepoint Technology</TopInterestsName> <TopInterestsID>Sharepoint Technology_ID</TopInterestsID> </TopInterests> </InterestCategory> <InterestCategory> <InterestCategoryName>Java Technologies</InterestCategoryName> <InterestCategoryID>Java Technologies_ID</InterestCategoryID> <TopInterests> <TopInterestsName>JSP</TopInterestsName> <TopInterestsID>JSP_ID</TopInterestsID> </TopInterests> <TopInterests> <TopInterestsName>Java Beans</TopInterestsName> <TopInterestsID>Java Beans_ID</TopInterestsID> </TopInterests> <TopInterests> <TopInterestsName>Command Prompt</TopInterestsName> <TopInterestsID>Command Prompt_ID</TopInterestsID> </TopInterests> </InterestCategory> <InterestCategory> <InterestCategoryName>Tech3</InterestCategoryName> <InterestCategoryID>Tech3_ID</InterestCategoryID> <TopInterests> <TopInterestsName>SubTech31</TopInterestsName> <TopInterestsID>SubTech31_ID</TopInterestsID> </TopInterests> <TopInterests> <TopInterestsName>SubTech32</TopInterestsName> <TopInterestsID>SubTech32_ID</TopInterestsID> </TopInterests> <TopInterests> <TopInterestsName>SubTech33</TopInterestsName> <TopInterestsID>SubTech33_ID</TopInterestsID> </TopInterests> </InterestCategory></TotalInterests> XSL developed to display the o/p in aspx popup: <?xml version="1.0"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" > <xsl:param name="Page" select="0" /> <xsl:param name="PageSize" select="2" /> <xsl:variable name="mycount" select="2"/> <xsl:template name="results" match="/"> <table border="0" cellspacing="0" cellpadding="0" class="mtop2" style="width:100%" id="selectInterests"> <tr> <td colspan="3"></td> </tr> <!--<table border="0" cellspacing="0" cellpadding="0" class="mtop2" style="width:100%" id="selectInterests1">--> <xsl:if test="position()<= number($PageSize)"> <xsl:for-each select="TotalInterests/InterestCategory"> <tr style="width:99%"><b><xsl:value-of select="InterestCategoryName"/></b></tr> <xsl:for-each select="TopInterests[position() mod 3 = 1]"> <xsl:variable name="Currentpos" select ="(position()-1)*3+1"/> <tr style="height:20px;"> <xsl:for-each select="../TopInterests[position()>=$Currentpos and position() < $Currentpos+3]"> <td style="width:33%"> <input type="checkbox" name="objectives" class="vmiddle"><xsl:attribute name="onclick">java script:SelectedCheckbox('<xsl:value-of select="TopInterestsID" />');</xsl:attribute></input> <xsl:value-of select="TopInterestsName"/> </td> </xsl:for-each> </tr> </xsl:for-each> <tr style="height:15px;"> </tr> </xsl:for-each> </xsl:if> <!--</table>--> <tr> <td colspan="3"> <div id="pagn" class="mzeroall"> <!-- Prev link for pagination --> <xsl:choose> <xsl:when test="number(($Page)-1) > 0"> <a><xsl:attribute name="href">java script:skillsetDisplay('<xsl:value-of select="number(($Page)-1)"/>', '<xsl:value-of select="$PageSize"/>');</xsl:attribute><<Prev</a> </xsl:when> <xsl:otherwise> </xsl:otherwise> </xsl:choose> <!-- Next link for pagination --> <xsl:choose> <xsl:when test="(number($PageSize)) <= number($mycount)"> <a><xsl:attribute name="href">java script:skillsetDisplay('<xsl:value-of select="number(($Page)+1)"/>', '<xsl:value-of select="$PageSize"/>');</xsl:attribute>Next>></a> </xsl:when> <xsl:otherwise> <!-- display something else --> </xsl:otherwise> </xsl:choose> </div> </td> </tr> </table> </xsl:template></xsl:stylesheet> I am using the below transformation method://popupskillsresult - Div in which the oputput should display.//myStreamData - xml being passed//LearningInterestsxsl - xsl being passed function skillsettransform(){myStreamData = <!-- Above mentioned XML will be passed here--> $.transform( { el: "#popupskillsresult", async: false, xmlstr: myStreamData, xslstr: LearningInterestsxsl } ); } I need to display the o/p in a new popup (aspx page). The same is displaying the o/p within the page. Please help.Regards,Rakesh Vikram Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.