levio
asked on
Why isn't this javascript working inside a "Spry Collapsable Panel"?
My objective here has been to use Javascript for client side sorting of an XML file inside of a "Spry Collapsible Panel" using XSL for the styling. I did successfully recreate (from a tutorial) the appropriate .xsl, .xml and .js 'sample' files.
The Problem::
When I tried to transfer the working 'sample' files I created into the final project, it didn't work. I assume it has something to do with the spry panels because if I move the chunk of code out of the collapsible panel it works.
The link is:
http://www.leviandlindsey.com/test/cnvtd_diagnostics.xml
Any help on this is GREATLY appriciated!!!
Thanks,
Levi
The Problem::
When I tried to transfer the working 'sample' files I created into the final project, it didn't work. I assume it has something to do with the spry panels because if I move the chunk of code out of the collapsible panel it works.
The link is:
http://www.leviandlindsey.com/test/cnvtd_diagnostics.xml
Any help on this is GREATLY appriciated!!!
Thanks,
Levi
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="column" select="'pid'" />
<xsl:template match="/">
<html>
<head>
<title>MRD Diagnostic</title>
<script language="JavaScript"> document.onmousedown=function (){ if (event.button==2)alert('RightClick disabled!!!'); event.cancelBubble=false; }</script>
<script src="javascript/common.js" type="text/javascript" />
<link href="css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="CollapsiblePanel11" class="CollapsiblePanel">
<div class="CollapsiblePanelTab" tabindex="0">Processes</div>
<div class="CollapsiblePanelContent">
<table cellpadding="4px" cellspacing="1px" border="0px" style="font-size:10px;">
<tr style="background: #83D173;">
<td onmousedown="javascript:sort('pid');">PID</td>
<td onmousedown="javascript:sort('uid');">UID</td>
<td onmousedown="javascript:sort('vmsize');">VMSIZE</td>
<td onmousedown="javascript:sort('stat');">STAT</td>
<td onmousedown="javascript:sort('cmd');">CMD</td>
</tr>
<xsl:if test="$column='pid'">
<xsl:apply-templates select="root/processes/proc">
<xsl:sort select="@pid" data-type="number" order="ascending" />
</xsl:apply-templates>
</xsl:if>
<xsl:if test="$column='uid'">
<xsl:apply-templates select="root/processes/proc">
<xsl:sort select="@uid" order="ascending" />
</xsl:apply-templates>
</xsl:if>
<xsl:if test="$column='vmsize'">
<xsl:apply-templates select="root/processes/proc">
<xsl:sort select="@vmsize" data-type="number" order="ascending" />
</xsl:apply-templates>
</xsl:if>
<xsl:if test="$column='stat'">
<xsl:apply-templates select="root/processes/proc">
<xsl:sort select="@stat" order="ascending" />
</xsl:apply-templates>
</xsl:if>
<xsl:if test="$column='cmd'">
<xsl:apply-templates select="root/processes/proc">
<xsl:sort select="@cmd" order="ascending" />
</xsl:apply-templates>
</xsl:if>
</table>
<br />
</div>
</div>
</body>
</html>
</xsl:template>
<xsl:template match="root/processes/proc">
<tr>
<td><xsl:value-of select="@pid" /></td>
<td><xsl:value-of select="@uid" /></td>
<td><xsl:value-of select="@vmsize" /></td>
<td><xsl:value-of select="@stat" /></td>
<td align="right"><xsl:value-of select="@cmd" /></td>
</tr>
</xsl:template>
</xsl:stylesheet>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER