[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Combo box and event Onchange

Subject: RE: Combo box and event Onchange
From: "Igor Nakshin" <inakshin@xxxxxxxxxxx>
Date: Thu, 6 Apr 2000 09:36:37 -0500
javascript combo box events
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.