timothy ma and constance lee
Usenet Archive
- Joined
- Jul 21, 2004
- Messages
- 57
- Reaction score
- 0
Sir
I am using the recursive template to generate the dynamic drop down list as below:
<xsl:template name="generateDropdown">
<xsl
aram name="length" />
<xsl
aram name="refrid" />
<xsl
aram name="count" select="$length"/>
<xsl:if test="$length > 0">
<option value="{$refrid}|{$count - $length +1}"><xsl:value-of select="$count - $length +1" /></option> <xsl:call-template name="generateDropdown"> <xsl:with-param name="length" select="$length -1"/> <xsl:with-param name="count" select="$count"/> <xsl:with-param name="refrid" select="$refrid"/> </xsl:call-template> </xsl:if> </xsl:template>
The value will be ascending order from 1 to length. However, is it possible to add the blank line like option value <option value=""></option> so that the toppest list is blank value first and then 1 and so on
I am using the recursive template to generate the dynamic drop down list as below:
<xsl:template name="generateDropdown">
<xsl
<xsl
<xsl
<xsl:if test="$length > 0">
<option value="{$refrid}|{$count - $length +1}"><xsl:value-of select="$count - $length +1" /></option> <xsl:call-template name="generateDropdown"> <xsl:with-param name="length" select="$length -1"/> <xsl:with-param name="count" select="$count"/> <xsl:with-param name="refrid" select="$refrid"/> </xsl:call-template> </xsl:if> </xsl:template>
The value will be ascending order from 1 to length. However, is it possible to add the blank line like option value <option value=""></option> so that the toppest list is blank value first and then 1 and so on