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

RE: checking checkboxes based on a value of an xml nod

Subject: RE: checking checkboxes based on a value of an xml node
From: timw@xxxxxxx
Date: Tue, 4 Sep 2001 10:13:11 +1000
fop checked box
Hi Adam,

How about checking the box in the xslt based on the value you want to test
against.

 <tr>
   <td class="OFFICElabel">Can Dial</td>
   <td class="OFFICEaddress">
    <xsl:choose>
      <xsl:when test="Xpath/to/checkbox = '1'">
       <INPUT type="checkbox" name="Can_Dial"/>
      </xsl:when>
      <xsl:otherwise>
       <INPUT type="checkbox" name="Can_Dial"/>
      </xsl:otherwise>
    </xsl:choose>
   </td>
   <xsl:apply-templates select="/page/Building/Can_Dial/>
 </tr>


Tim Watts

> -----Original Message-----
> From: Adam Darwin [mailto:addarwin@xxxxxxxxxxx]
> Sent: Tuesday, 4 September 2001 3:24 AM
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  checking checkboxes based on a value of an xml node
> 
> 
> I have a check box which is generated regardless of
> whether the node exists or not, and beneath the
> declaration for the check box i apply the template for
> said node.
> <tr>
>   <td class="OFFICElabel">Can Dial</td>
>   <td class="OFFICEaddress"><INPUT type="checkbox"
> name="Can_Dial"/></td>
>   <xsl:apply-templates
> select="/page/Building/Can_Dial/>
> </tr>
> 
> Within this template I check to see if the value is 1
> if it is i check the box using javascript
> (document.frmBuilding.Can_Dial.checked = true).
> 
> this doesn't work, anyone know why? I think it might
> be that you can't check boxes on load, as if i create
> a button, using the same code will work after the page
> has loaded.
> 
> Any ideas as to an alternative?
> 
> ____________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> or your free @yahoo.ie address at http://mail.yahoo.ie
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.