This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to use variable as "checked" in checkbox


Does your data indicate which elements should appear checked, or does
it come from some other source, such as a parameter to be passed to the
transformation?

Please include a sample of your XML data.

-- 
Charles Knell
cknell@onebox.com - email


---- Ming <myu@lanl.gov> wrote:
> Hi,
> 
> I'm trying to display a checkbox in my stylesheet.
> 
>           <input name="marks" checked type="checkbox" onClick= ...
> />
> 
> But as for the "checked" part, I am using a variable to do the job.
>  It
> returned string contained either "checked" or " ".
> 
> <xsl:variable name="checked">
>         <xsl:value-of select="xslfunction:getCheckedValue()"/>
>  </xsl:variable>
> 
> So, what I've done is:
> 
> <input name="marks" "{$checked}"  type="checkbox" onClick= .../>
> 
> but obviously I am not doing it right.
> 
> Can you help me on this?
> 
> Thanks a lot in advance.
> 
> Ming
> 
> 
> 
> 
> 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
>  

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]