XML if-Schleife mit Visibiltätsverknüpfung

Biene1984

Grünschnabel
Hallo alle miteinander,

ich habe ein Problem, eine if-Schleife in einen ziemlich komplizierten XML-Code einzubauen, kann mir da jemand behilflich sein?

Es gibt eine Combo-Box "Grundtypisierung" (erster Code-Teil) die zur Auswahl 3 Attribute besitzt. Ich möchte nun, dass die zweite Combo-Box "EProgrammierung" nur angezeigt wird, also sichtbar ist, wenn als Grundtypisierung der Wert Programmierung gewählt worden ist. Bin wirklich verzweifelt, hab schon so viel versucht aber nichts hat gefruchtet.

Der Code:

XML:
<select name="wcmprop.wdb:Grundtypisierung" tabindex="9164" class="urDdlWhl" id="field_1196672735287">
       <xsl:attribute name="title">
            <xsl:value-of select="$resources/TEXT[@AKEY='tol_T_1196672735287']"/>
        </xsl:attribute>
        <xsl:apply-templates select="./xf:resourceproperties/xf:property
         [@id='wdb:Grundtypisierung']/xf:allowedvalues">
             <xsl:with-param select="'combo'" name="mode"/>
             <xsl:with-param select="'wcmprop.wdb:Grundtypisierung'" name="inputname"/>
             <xsl:with-param select="./xf:resourceproperties/xf:property
              [@id='wdb:Grundtypisierung']/xf:values/xf:valuedef/xf:value" name="value"/>
        </xsl:apply-templates>
</select>
....
....
<td height="3%" valign="top" width="15%" rowspan="1" colspan="2">
     <nobr>
        <select name="wcmprop.wdb:EProgrammierung" tabindex="9167" 
         class="urDdlWhl" id="field_1196952359370">
            <xsl:attribute name="title">
               <xsl:value-of select="$resources/TEXT[@AKEY='tol_T_1196952359370']"/>
            </xsl:attribute>
            <xsl:apply-templates select="./xf:resourceproperties/xf:property
             [@id='wdb:EProgrammierung']/xf:allowedvalues">
              <xsl:with-param select="'combo'" name="mode"/>
              <xsl:with-param select="'wcmprop.wdb:EProgrammierung'" name="inputname"/>
              <xsl:with-param select="./xf:resourceproperties/xf:property
               [@id='wdb:EProgrammierung']/xf:values/xf:valuedef/xf:value" name="value"/>
             </xsl:apply-templates>
        </select>
     </nobr>
</td>
Liebe Grüße

Nina
 
Zuletzt bearbeitet von einem Moderator:
Hi.

Dafür mußt du Javascript Code schreiben, der das Element beim gewünschten Wert anzeigt bzw. versteckt.

Gruß

PS: Bitte verwende die entsprechenden Code Tags wie [code=xml]...[/code] für deinen Code, so werden die Smilies nicht angezeigt und man kann es viel besser lesen.
 
Zuletzt bearbeitet von einem Moderator:
Hallo,

nur mal so als kurzer Input. Es gibt keine if-Schleife, sondern nur eine If-Anweisung. :)

MFG

Sascha
 

Neue Beiträge

Zurück