This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Microsoft XML > April 2007 > option selected
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| I have this select
<select >
<option value="DE" >Prima colazione</option>
<option value="OB" >Solo camera</option>
<option value="ME" >Mezza pensione</option>
<option value="PC" >Pensione Completa</option>
<option value="TI" >All inclusive</option>
</select>
My issue is select the right option using xsl...
for e.g the parameter send "ME"
so the results should be:
<select >
<option value="DE" >Prima colazione</option>
<option value="OB" >Solo camera</option>
<option value="ME" selected>Mezza pensione</option>
<option value="PC" >Pensione Completa</option>
<option value="TI" >All inclusive</option>
</select>
I tryed using when statement It seems too complex as solution...
it' possible to use some others Solutions ?
thanks in advance.
| |
|
| On 19 Apr, 19:19, Ghena <lastminute...@XXXXXXXXXX> wrote:
> I have this select
>
> <select >
> <option value="DE" >Prima colazione</option>
> <option value="OB" >Solo camera</option>
> <option value="ME" >Mezza pensione</option>
> <option value="PC" >Pensione Completa</option>
> <option value="TI" >All inclusive</option>
> </select>
>
> My issue is select the right option using xsl...
>
> for e.g the parameter send "ME"
>
sorry, I solved
<select name="newplan" style="float:right;" class="barra_select"
onchange="document.cambia.submit();return false">
<option value="DE" >
<xsl:if test="$oldplan = 'DE' ">
<xsl:attribute name = "selected">true</xsl:attribute>
</xsl:if>
Prima colazione
</option>
<option value="OB" >
<xsl:if test="$oldplan = 'OB' ">
<xsl:attribute name = "selected">true</xsl:attribute>
</xsl:if>
Solo camera
</option>
<option value="ME" >
<xsl:if test="$oldplan = 'ME' ">
<xsl:attribute name = "selected">true</xsl:attribute>
</xsl:if>
Mezza pensione
</option>
<option value="PC" >
<xsl:if test="$oldplan = 'PC' ">
<xsl:attribute name = "selected">true</xsl:attribute>
</xsl:if>
Pensione Completa
</option>
<option value="TI" >
<xsl:if test="$oldplan = 'AI' ">
<xsl:attribute name = "selected">true</xsl:attribute>
</xsl:if>
All inclusive
</option>
</select>
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|