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

document.write

Subject: document.write
From: anna.stefani@xxxxxxxxx
Date: Thu, 29 Nov 2001 18:52:20 +0100
anna stefani

I have a problem with scripts in xsl.
I test to include script in this way:

<xsl:template match="Car_Status_Descr">
<xsl:script>
names= new String("01; 02; 03; 04")
pattern=/\s*;\s*/
nameList = names.split(pattern)
for (i=0; i &lt; (nameList.length); (i++)) {
   n = nameList[i];
   if (n=="01") {

   document.write(n + "Anna Stefani" + "")

   }
   if (n=="02") {

   document.write(n + "Harry Potter" + "")

   }

}
</xsl:script>
</xsl:template>

But IE Explorer reply me "Microsoft JScript runtime error 'document' is
undefined line ".
I try to change script in this way below but don't work.


<xsl:template match="Car_Status_Descr">
<SCRIPT LANGUAGE="Javascript1.2">
names= new String("01; 02; 03; 04")
pattern=/\s*;\s*/
nameList = names.split(pattern)
for (i=0; i &lt; (nameList.length); (i++)) {
   n = nameList[i];
   if (n=="01") {

   document.write(n + "Anna Stefani" + "")

   }
   if (n=="02") {

   document.write(n + "Harry Potter" + "")

   }

}
</SCRIPT>
</xsl:template>


I try to insert this javascript in a very simple web page (html) and it works
correctly.
I don't understand where is the problem??? How can I do it???

Thanks,
Regards,
Anna.




 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.