From: Ziad EL KHATIB (z.elkhatib@vivacances.fr)
Date: 06/11/2003 - 09:04
Ok c'est exactement ce qu'il me fallait, j'aurais du y penser ;-)
Merci.
-----Message d'origine-----
De : Testud David [mailto:david.testud@ledl.com]
Envoyé : jeudi 6 novembre 2003 09:52
À : 'xml-tech@xmlfr.org'
Objet : [xml-tech] Re: <select><option selected="selected">...
Bonjour, voici un exemple avec comparaison de 2 valeurs à adapter selon vos
besoins
<select name="signature">
<option value="">----------- Toutes les signatures
---------</option>
<xsl:for-each select="/result/key/list/elem">
<option>
<xsl:attribute name="value"><xsl:value-of
select="."/></xsl:attribute>
<xsl:if test="$formValueSignature =
$valeurItem">
<xsl:attribute
name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:value-of select="."/>
</option>
</xsl:for-each>
</select>
@+
David
->->-> -----Message d'origine-----
->->-> De : xml-tech-bounce@xmlfr.org [mailto:xml-tech-bounce@xmlfr.org]
->->-> Envoyé : jeudi 6 novembre 2003 09:46
->->-> À : xml-tech@xmlfr.org
->->-> Objet : [xml-tech] <select><option selected="selected">...
->->->
->->->
->->->
->->-> Bonjour,
->->->
->->-> J'ai une balise <select> avec pleins d'options dedans:
->->->
->->-> <option
->->-> value="01">01:00</option>
->->-> <option value="02">02:00</option>
->->-> <option value="03">03:00</option>
->->-> <option value="04">04:00</option>
->->-> <option value="05">05:00</option>
->->-> <option value="06">06:00</option>
->->-> <option value="07">07:00</option>
->->-> <option value="08">08:00</option>
->->-> <option value="09">09:00</option>
->->-> <option value="10">10:00</option>
->->-> <option value="11">11:00</option>
->->-> <option value="12">12:00</option>
->->-> <option value="13">13:00</option>
->->-> <option value="14">14:00</option>
->->-> <option value="15">15:00</option>
->->-> <option value="16">16:00</option>
->->-> <option value="17">17:00</option>
->->-> <option value="18">18:00</option>
->->-> <option value="19">19:00</option>
->->-> <option value="20">20:00</option>
->->-> <option value="21">21:00</option>
->->-> <option value="22">22:00</option>
->->-> <option value="23">23:00</option>
->->->
->->-> Je voudrais, selon une valeur que je récupère mettre
->->-> l'otion à selected="selected". Est-ce faisable sans
->->-> mettre des tonnes de if ?
->->->
->->-> Merci.
->->-> --
->->-> Devenez redacteur <XML>fr et contribuez au developpement du
->->-> xml francophone (http://xmlfr.org/infos/redacteurs/) !
->->->
->->-> Liste de diffusion "xml-tech@xmlfr.org" (http://xmlfr.org).
->->->
->->-> Cette liste est a votre disposition pour discuter en francais de
->->-> tout sujet technique lie a XML.
->->->
->->-> Pour resilier votre abonnement, envoyez un message contenant
->->-> la commande "unsubscribe" a xml-tech-request@xmlfr.org
->->-> (mailto:xml-tech-request@xmlfr.org?Subject=unsubscribe)
->->->
--
Devenez redacteur <XML>fr et contribuez au developpement du
xml francophone (http://xmlfr.org/infos/redacteurs/) !
Liste de diffusion "xml-tech@xmlfr.org" (http://xmlfr.org).
Cette liste est a votre disposition pour discuter en francais de
tout sujet technique lie a XML.
Pour resilier votre abonnement, envoyez un message contenant
la commande "unsubscribe" a xml-tech-request@xmlfr.org
(mailto:xml-tech-request@xmlfr.org?Subject=unsubscribe)
--
Devenez redacteur <XML>fr et contribuez au developpement du
xml francophone (http://xmlfr.org/infos/redacteurs/) !
Liste de diffusion "xml-tech@xmlfr.org" (http://xmlfr.org).
Cette liste est a votre disposition pour discuter en francais de
tout sujet technique lie a XML.
Pour resilier votre abonnement, envoyez un message contenant
la commande "unsubscribe" a xml-tech-request@xmlfr.org
(mailto:xml-tech-request@xmlfr.org?Subject=unsubscribe)
Archive générée par hypermail 2.1.3 le 28/06/2004 - 11:06 UTC
webmaster@xmlfr.org
|