|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Combo box and event Onchange
Catherine,
> When I dispay the value pass to my javascript function (with alert in
> javascrip), there is no value.
That's a different problem.
try something like
<xsl:element name="select">
<xsl:attribute name="id">mycombo</xsl:attribute>
<xsl:attribute name="OnChange">ChargeRecherche()/xsl:attribute>
<xsl:attribute name="name">listeRecherche</xsl:attribute>
<xsl:for-each select="liste">
<xsl:element name="option">
<xsl:attribute name="value">
<xsl:value-of select="@Id"/>
</xsl:attribute>
<xsl:value-of select="@Name"/>
</xsl:element>
</xsl:for-each>
</xsl:element>
<script language="javascript">
<![CDATA[
function ChargeRecerche() {
alert(mycombo[mycombo.selectedIndex].value);
}
]]>
</script>
Depending on the browser you are using you might need to change reference to
my combo object in
javascript to document.all[] or something like that.
Igor.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








