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

RE: newbie question concerning javascript and xsl.

Subject: RE: newbie question concerning javascript and xsl.
From: Pieter Reint Siegers Kort <pieter.siegers@xxxxxxxxxxx>
Date: Wed, 2 Mar 2005 10:02:34 -0600
javascript this
Hi Lior,

You cannot use javascript inside your XSL. You'll need to pass the
this.innerHTML into the stylesheet using a parameter and then create the
onclick event that (when the page is created and loaded in the browser)
fires the javascript submit_channel function, passing in the parameter value
of this.innerHTML.

HTH,
<prs/>

-----Original Message-----
From: Lior Kesos [mailto:lior.kesos@xxxxxxxxx] 
Sent: Wednesday, March 02, 2005 9:52 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  newbie question concerning javascript and xsl.

I have a "classic" xml xsl and javascript environment in which all of the
elements are on different files.
My index.html loads the xml and xsl succssfully and renders a table which
you can see below.

<xsl:for-each select="CHANNEL[SERVER = 'db2srv1']">
        <xsl:sort select="name"/>
        <tr>
        <xsl:if test="META = 'enterprise'">
          <td class="enterprise"
onclick="submit_channel(this.innerHTML)"><xsl:value-of
select="EXTENSION"/></td>
        </xsl:if>
        <xsl:if  test="META = 'community'">
          <td class="community"
onclick="submit_channel(this.innerHTML)"><xsl:value-of
select="EXTENSION"/></td>
        </xsl:if>
        </tr>
        </xsl:for-each>

I know that the this.innerHTML is wrong but I can't figure out how to pass
the EXTENSION parameter to the javascript.

The closest I got to was if I put submit_channel({.}) which I saw in some
sniplet.
I have been trying to read this until solution  but after 2 days of googling
and trying different approaches I'm consulting with the pros...

any help will be appriciated.
Lior.
--
Peace Love and Penguins -
Lior Kesos

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.