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

RE: XSL and SELECT

Subject: RE: XSL and SELECT
From: Jonathan Marsh <jmarsh@xxxxxxxxxxxxx>
Date: Thu, 11 May 2000 12:23:31 -0700
html select this.options this.selectedindex .value
Comments below:

> -----Original Message-----
> From: gilles lescot [mailto:glescot@xxxxxxxxxxx]
> Sent: Thursday, May 11, 2000 1:31 AM
> To: XSL-List@xxxxxxxxxxxxxxxx
> Subject: XSL and SELECT
> 
> 
> Consider my problem: i want the user select a filter option 
> (by a HTML 
> SELECT ) and then execute a xsl script.
> The Microsoft examples give a solution using many xsl script 
> (corresponding 
> to filter options).
> I think there is a better solution (using only one xsl file) 
> and i have 2 
> ideas:
> 
> 1) consider the following source code: the goal is to set a 
> javascript 
> global variable
> 
> 			<BODY>
> 				<SELECT 
> onchange="setMessageType(this.options[this.selectedIndex].value)">
> 				<OPTION VALUE="All">All</OPTION>
> 				<OPTION VALUE="INFO">INFO</OPTION>
> 				</SELECT>
> 
> .....
> <xsl:script language="JavaScript">
> <![CDATA[
> var MessageType = '';  //Global variable used by all functions !!!!
> function setMessageType(e)
> {
> 	MessageType = e;
> }
> ]]>
> </xsl:script>

Neither in IE5 nor anywhere else are script functions callable directly by
DHTML scripts.  See
http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/xmlsdk/xslp0
rho.htm for more information on the interactions (or lack of same) of
transformation-time and run-time scripts.


> the "setMessageType" is a javascript function. The problem is 
> how to do to 
> call it (IE5 outputs an error "Object expected")
> 
> 
> 2) is it possible to use a xsl:variable in the SELECT ?
> I've tried to declare a xsl:variable but IE5 answers "Keyword 
> xsl:variable 
> may not be used here".

xsl:variable is not available in IE5.  Check out our latest preview release
if you want to experiment with this capability.
http://msdn.microsoft.com/downloads/webtechnology/xml/msxml.asp

- Jonathan Marsh
  Microsoft


 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.