[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Why isn't this javascript working inside a "Spry Collapsable Panel"?

Posted on 2008-10-12
2
Medium Priority
?
480 Views
Last Modified: 2013-11-18
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
<?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>

Open in new window

0
Comment
Question by:levio
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 44

Accepted Solution

by:
scrathcyboy earned 2000 total points
ID: 22747130
Since no one is helping you, the best advice I can give you is to DUMP SPRY for any one of a hundred DHTML menus that do indeed work cross browser --

www.dynamicdrive.com/
www.dynamicdrive.com/dynamicindex1/
dhtml-menu.com/
www.milonic.com/
www.dynarch.com/products/dhtml-menu/ 
www.likno.com/ 
www.coffeecup.com/free-dhtml/ 

Most people I have tried to help with SPRY cannot get it to work, it seems to be a flawed product.
0
 
LVL 1

Author Closing Comment

by:levio
ID: 31505501
Thanks... I will try one of those...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to implement server side field validation and display customized error messages to the client.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question