Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #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

Reply With Quote
  #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)
Reply With Quote
  #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

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 03: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 10:26 AM
How to stop user from view js code but still work bekim Javascript How-To 4 January 7th, 2005 08:08 PM



All times are GMT -4. The time now is 05:49 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.