Hi all,
this is driving me crazy. I am trying to do two things.
firstly i am trying to get a html select to show a default option. I have seen this post:
but i can't get it to work.
This is what i have got at the moment:
<select name="CountryID">
<xsl:for-each select="//FormContent/countries/country">
<option value="{@id}"><xsl:value-of select="."/>
<xsl:if test="'54911DA6-F0FA-237B-A411FE65AB85AAE4'=$Country">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
</option>
</xsl:for-each>
</select>
2ndly i am trying to pass a param called Country into the xslt from a server side page, and i want to test to see if the passed param matches the value in my id attribute. when i try to do the comparison against the xml value it fails that's why i have the hardcoded value in there at the moment.
any ideas?
TIA
Tony
this is driving me crazy. I am trying to do two things.
firstly i am trying to get a html select to show a default option. I have seen this post:
but i can't get it to work.
This is what i have got at the moment:
<select name="CountryID">
<xsl:for-each select="//FormContent/countries/country">
<option value="{@id}"><xsl:value-of select="."/>
<xsl:if test="'54911DA6-F0FA-237B-A411FE65AB85AAE4'=$Country">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
</option>
</xsl:for-each>
</select>
2ndly i am trying to pass a param called Country into the xslt from a server side page, and i want to test to see if the passed param matches the value in my id attribute. when i try to do the comparison against the xml value it fails that's why i have the hardcoded value in there at the moment.
any ideas?
TIA
Tony