Hallo Leute,
wenn ich in einem Dropdown-Feld noch nichts ausgewählt habe, das Feld also noch keinen Wert (aus einer vorhandenen Liste) zugewiesen bekommen hat und leer ist, wie kann ich dann trotzdem diesem LEEREN Feld einen Wert xyz zuordnen?
wenn ich in einem Dropdown-Feld noch nichts ausgewählt habe, das Feld also noch keinen Wert (aus einer vorhandenen Liste) zugewiesen bekommen hat und leer ist, wie kann ich dann trotzdem diesem LEEREN Feld einen Wert xyz zuordnen?
Code:
<select class="xdComboBox xdBehavior_Select" title="" style="FONT-SIZE: 7pt; WIDTH: 73px" size="1" xd:xctname="DropDown" xd:CtrlId="CTRL199" xd:binding="my:NCC-Infos/my:NCC-Kopf/my:ru" xd:boundProp="value" value="" tabIndex="0"> <xsl:attribute name="value"> <xsl:value-of select="my:NCC-Infos/my:NCC-Kopf/my:ru"/> </xsl:attribute> <xsl:choose> <xsl:when test="function-available('xdXDocument:GetDOM')"> <option/> <xsl:variable name="val" select="my:NCC-Infos/my:NCC-Kopf/my:ru"/> <xsl:if test="not(xdXDocument:GetDOM("NCC-Originaldaten")/dfs:myFields/dfs:dataFields/dfs:NCC/@NCC_RU[not(.=preceding::dfs:NCC/@NCC_RU)][.=$val] or $val='')"> <option selected="selected"> <xsl:attribute name="value"> <xsl:value-of select="$val"/> </xsl:attribute> <xsl:value-of select="$val"/> </option> </xsl:if> <xsl:for-each select="xdXDocument:GetDOM("NCC-Originaldaten")/dfs:myFields/dfs:dataFields/dfs:NCC/@NCC_RU[not(.=preceding::dfs:NCC/@NCC_RU)]"> <xsl:sort select="." order="ascending"/> <option> <xsl:attribute name="value"> <xsl:value-of select="."/> </xsl:attribute> <xsl:if test="$val=."> <xsl:attribute name="selected">selected</xsl:attribute> </xsl:if> <xsl:value-of select="."/> </option> </xsl:for-each> </xsl:when> <xsl:otherwise> <option> <xsl:value-of select="my:NCC-Infos/my:NCC-Kopf/my:ru"/> </option> </xsl:otherwise> </xsl:choose> </select>
Comment