Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XSL Drop Down Box 1

Status
Not open for further replies.

Jyme

MIS
Apr 28, 2004
29
US
I have a tag <pregnant>


I want to create a drop down box with 3 options in html


"blank"
Yes
No


Depending on what is in the tag of pregnant Id like to have one of the
3 selected..how can I do this?

thanks
 
Code:
<select name="pregnant">
  <option value=""/>
  <option value="Yes">
    <xsl:if test="preganant = 'Yes'">
      <xsl:attribute name="selected">selected</xsl:attribute>
    </xsl:if>
  </option>
  <option value="No">
    <xsl:if test="preganant = 'No'">
      <xsl:attribute name="selected">selected</xsl:attribute>
    </xsl:if>
  </option>
</select>

Jon

"I don't regret this, but I both rue and lament it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top