Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 10th, 2006, 01:10 AM
Authorized User
 
Join Date: May 2006
Location: banglore, karnataka, India.
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default error in JS code

hi i have written the following javascript code in an xsl
Code:
for(var i = 0; i < 3 ; i++) {
 alert(i);
}
i get the following error "Expected )"

i know it is because of the ; of < but i cannot use the symbol in xsl

thanks

  #2 (permalink)  
Old May 10th, 2006, 02:19 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Put your function definitions and code in a CDATA section, you can then use "real" JavaScript and not worry about special characters.

--

Joe (Microsoft MVP - XML)
  #3 (permalink)  
Old May 10th, 2006, 03:42 AM
Authorized User
 
Join Date: May 2006
Location: banglore, karnataka, India.
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi i did that and it gives me the same error

i have noticed that when the xsl is applied the "<" symbol will be
converted to "&lt;"

can u please help

Thanks



Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert ASP code in JS *need HELP* deean Classic ASP Basics 16 June 28th, 2008 08:57 AM
need help on this JS error code in IE kumiko Javascript 2 February 12th, 2008 04:35 AM
zxml.js version 1.0 minor code defects darrenshu BOOK: Professional Ajax ISBN: 978-0-471-77778-6 7 October 31st, 2007 09:25 AM
Wrong zXml.js file somewhere in the code package? laurens-b BOOK: Professional Ajax ISBN: 978-0-471-77778-6 2 March 20th, 2006 11:26 AM
How to stop user from view js code but still work bekim Javascript How-To 4 January 7th, 2005 09:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.