[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] using script functions on value-of select
Hi, I'm trying to run a simple script to format some data from a value-of select. I'm new to this and I've been looking everywhere for a solution. Any help is appreciated. Here's the xsl: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" language="javascript"> <xsl:template match="/"> <h3>Order Report</h3> <table cellpadding="3" cellspacing="0"> <tr> <th><b>Order Status</b></th> <th><b>View Order</b></th> <th><b>Order Number</b></th> <th><b>Order Date</b></th> <th><b>Submittted By </b></th> <th><b>User Name</b></th> </tr> <xsl:apply-templates select="//orderreport"/> </table> </xsl:template> <xsl:template match="orderreport" language="VBScript"> <form> <tr> <td> <xsl:element name="input"> <xsl:attribute name="type">button</xsl:attribute> <xsl:attribute name="value">Order Status</xsl:attribute> <xsl:attribute name="onclick">StatusOpen('<xsl:value-of select="invoiceid" />');</xsl:attribute> </xsl:element> </td> <td><xsl:element name="input"> <xsl:attribute name="type">button</xsl:attribute> <xsl:attribute name="value">View Order</xsl:attribute> <xsl:attribute name="onclick">VOOpen('<xsl:value-of select="invoiceid" />','<xsl:value-of select="name" />','<xsl:value-of select="usertid" />');</xsl:attribute> </xsl:element> </td> <td><xsl:value-of select="invoiceid" /></td> <td><xsl:element name="date"><xsl:value-of select="invoicedate" /> <xsl:eval>formatDate(this)</xsl:eval> </xsl:element> </td> <td><xsl:value-of select="usertid" /></td> <td><xsl:value-of select="name" /></td> </tr> </form> <xsl:script> <![CDATA[ function formatDate(idate) formatDate = formatDateTime(idate,vbshortdate) end function ]]> </xsl:script> </xsl:template> </xsl:stylesheet> __________________________________________________ Do You Yahoo!? >From homework help to love advice, Yahoo! Experts has your answer. http://experts.yahoo.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|