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

RE: TD and input box values in XSL.

Subject: RE: TD and input box values in XSL.
From: "Joe Fawcett" <joefawcett@xxxxxxxxxxx>
Date: Thu, 24 Feb 2005 08:32:09 +0000
xml input box
I don't see this being an XSL question. You just need an event handler on the table that retrieves the element of the row clicked and parses out the data using the DOM, before entering it into the input box.

If you are struggling with the JavaScript I'd be happy to help if you email me off list with the actual HTML you have so far, although I normally only code for IE so can't guarantee it will work for all browsers. I have a Hotmail.com address, my user name is joefawcett.

Joe

From: Adam_Wetch@xxxxxxxxxxxxxxx
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  TD and input box values in XSL.
Date: Wed, 23 Feb 2005 16:57:24 -0800



I was wondering if its possible to pull a value from a TD (populated using
<xsl:value-of...>) for the purposes of showing that value in an input box.
Essentially I have a table of data (XML loaded using javascript), and when
a user clicks on a row, the data is shown in the table below for editing
purposes.

The TOP table is populated like so:

<xsl:template match="Data_Table">
      <tbody>
            <tr id="trTemp" name="tr">

                  <td id="td0">
                        <xsl:value-of select="DATA1"/>
                  </td>
                  <td id="td1">
                        <xsl:value-of select="DATA2"/>

                  </td>
            </tr>
      </tbody>
</xsl:template>

and so on...
There is a header row not included here.
The bottom table is populated like so:

<table>
            <tr>
              <td>Name:</td>
              <td>
                <input id="iName"
                       type="TEXT"
                   class="inputb"
                   value="{$DATA6}"/>
                 <input value="{???????}"/>

              </td>
            </tr>
</table>

What I would like to do is pull the data from the TD and put it into the
input marked {???????} when the user clicks on the row in the top table.
I can do it with a data island and javascript, with recordnumber and the
navigation code. But cannot figure it out with XSL values. The answer lies
within the XSL and javascript, i can feel it. heh  Thanks for any help.

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.