Subject: Re: [xsl] Radio Button Values From: "Thorr Giddings" <thorrgiddings@xxxxxxxxxxx> Date: Mon, 27 Dec 2004 11:30:38 -0600 |
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="uri:xsl">
</table> </xsl:template> </xsl:stylesheet>
From: Jannis Pohlmann <info@xxxxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] Radio Button Values Date: Mon, 27 Dec 2004 16:07:31 +0100
With
<xsl:template match="/path/to/yourElement">
<xsl:variable name="rowid"><xsl:number count="/path/to/yourElement" level="any" format="1"/></xsl:variable>
<input type="radio" name="Primary" value="{$rowid}" onClick="clearTheOld('P')"/>
<input type="radio" name="Secondary" value="{$rowid}" onClick=clearTheOld('S')"/>
<br/>
</xsl:template>
you should get something like this:
<input type="radio" name="Primary" value="1" onClick="clearTheOld('P')"/> <input type="radio" name="Secondary" value="1" onClick=clearTheOld('S')"/> <br/> <input type="radio" name="Primary" value="2" onClick="clearTheOld('P')"/> <input type="radio" name="Secondary" value="2" onClick=clearTheOld('S')"/> <br/> <input type="radio" name="Primary" value="3" onClick="clearTheOld('P')"/> <input type="radio" name="Secondary" value="3" onClick=clearTheOld('S')"/> <br/>
If you want the variable to start with value="11", you will have to use value="{$rowid + 10}" instead of value="{$rowid}"
Regards, Jannis
Thorr Giddings schrieb:
I have my xml data source and what I end up with is a list of lets say 3-10 elements. For each element in the list there are two radio buttons, they form two columns as they go down the list. My question is, how do I set unique values to each row of radio buttons. Here is what I kind of what I want to see in HTML:
<input type="radio" name="Primary" Value ="11" onClick="clearTheOld('P')" />
<input type="radio" name="Secondary" Value ="11"
onClick="clearTheOld('S')" />
</BR>
<input type="radio" name="Primary" Value ="12" onClick="clearTheOld('P')" />
<input type="radio" name="Secondary" Value ="12"
onClick="clearTheOld('S')" />
</BR>
<input type="radio" name="Primary" Value ="13" onClick="clearTheOld('P')" />
<input type="radio" name="Secondary" Value ="13"
onClick="clearTheOld('S')" />
</BR>
<input type="radio" name="Primary" Value ="14" onClick="clearTheOld('P')" />
<input type="radio" name="Secondary" Value ="14"
onClick="clearTheOld('S')" />
</BR>
<input type="radio" name="Primary" Value ="15" onClick="clearTheOld('P')" />
<input type="radio" name="Secondary" Value ="15"
onClick="clearTheOld('S')" />
</BR>
<input type="radio" name="Primary" Value ="16" onClick="clearTheOld('P')" />
<input type="radio" name="Secondary" Value ="16"
onClick="clearTheOld('S')" />
Any ideas? I am guessing I can set the values with a variable, but I just can't seem to figure that out.
Thanks.
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar o?= get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Radio Button Values, Jannis Pohlmann | Thread | Re: [xsl] Radio Button Values, Jannis Pohlmann |
[xsl] Determine file extension of p, John | Date | Re: [xsl] Determine file extension , Mukul Gandhi |
Month |