XSLT Selection Box for multi language...

wxdqz

New Member
Hello fellow computer bods....

I have what is such an easy problem but I cant seem to get it...

I have done this code and it is great and works beautifully except for one thing... I can not get the box to stay on the selected language. e.g if chinese is selected, it stays on Chinese until changed.

Do I use the HTML selected="" property....even then I cant get it to work....someone please help

<xsl:template match="/" mode="languageForm">
<form id="languageDrop">
<select size="1" onchange="location=getSelect(this)">
<option value=http://www.webdeveloper.com/forum/archive/index.php/"">Language</option>
<xsl:for-each select="/Page/Menu/MenuItem/MenuItem">
<xsl:choose>
<xsl:when test="@cDisplayName!=''">
<option value=http://www.webdeveloper.com/forum/archive/index.php/"/{@cName}"><xsl:value-of select="@cDisplayName"/></option>
</xsl:when>
<xsl:otherwise>
<option value="/{@cName}" selected="{$currentPage[@cDisplayName]}"><xsl:value-of select="@cName"/></option>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</select>
</form>
</xsl:template>
 
Back
Top