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

RE: Antwort: RE: XML-Data from JavaScript into XSL

Subject: RE: Antwort: RE: XML-Data from JavaScript into XSL
From: "Martinez, Brian" <brian.martinez@xxxxxxxx>
Date: Mon, 4 Nov 2002 08:14:35 -0700
dropdown xml
> From: Johannes.Becker@xxxxxx [mailto:Johannes.Becker@xxxxxx]
> Sent: Monday, November 04, 2002 6:29 AM
> Subject: Antwort: RE:  XML-Data from JavaScript into XSL
> 
> Hi,
> 
> If my English would be better I would explain it more detailed.
> 
> There's a JS-function if you changed something in a dropdown-field.
> Depending on what you changed (selectedIndex) an other 
> dropdown-field fills
> with the corresponding entrys from an xml-file.
> 
> 
> function patternClick()
> {
>   choiceReport=document.patternFrm.report.selectedIndex;
> 
> if(choiceReport == 1)
> {
>    // this part I would want in JS, like
> document.createdFrm.yearStart.options[0] = new Option(year,year);
>   <select>
>   <xsl:for-each select="options/option1">
>     <option>
>       <xsl:value-of select="."/>
>     </option>
>   <xsl:for-each>
> </select>
>
> < snip >
>
> 
> But how can I do that?

You're headed on the right path XSLT-wise, but your code above would output
literal HTML tags into a JavaScript function, which would cause obvious
problems with most browsers.  You need to use JavaScript inside the for-each
to populate the select list's option array with values from your XML input.
If you need help with the JavaScript, you can ask me via a private e-mail,
since this is not really an XSLT question.

cheers,
b.

| brian martinez                              brian.martinez@xxxxxxxx |
| senior gui programmer                                  303.708.7248 |
| trip network, inc.                                 fax 303.790.9350 |
| 6436 s. racine cir.                             englewood, co 80111 |
| http://www.cheaptickets.com/                   http://www.trip.com/ |


 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.