When you validate the rule in the editor, the error message will say
"SyntaxError: missing ; before statement," and the exact point where the
error occurred will be highlighted in the editor.  In this case, the
selection will be right on the capital P at the beginning of "PANTONE
143".  In addition, if you're using the syntax highlighting editor in
FusionPro 4.2 or later, you should see that that text is not highlighted
as a string.  These are important clues.

The problem is that the double-quote character (") delimits literal
strings, so if you have a double-quote character inside of a string,
such as when you have an attribute with spaces inside a tag, you need to
escape the double-quotes so that the JavaScript interpreter knows that
they're actually a part of the string, rather than delimiters.  There
are two ways to do this:

1. Use a backslash (\) escape inside the string literal:

  "<color name=\"PANTONE 143\"> &bull; </color>  fax: "

2. Use single-quotes (') to delimit the string literal: 

  '<color name="PANTONE 143"> &bull; </color>  fax: '

In the first case, the backslash is an escape, which tells JavaScript
that the next character is a "special character."
<http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:Literals
#Using_Special_Characters_in_Strings>

In the second case, you're delimiting the string literal with
single-quotes instead of double-quotes.  JavaScript treats both kinds of
string literals the same way, except that "unescaped" double-quotes are
allowed in a string literal delimited with single-quotes, and
vice-versa.

Dan


+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
FusionPro 5.0 Now Available!


Variable text on a curve and soft drop-shadows for variable text


LIMITED TIME upgrade offer of $299 per license for current customers:
http://fusionpro.printable.com/store/upgrade

New licenses available for $599 each at:
http://fusionpro.printable.com/store/

All FusionPro 5.0 customers to receive FusionPro 5.1 with
Adobe Acrobat 8 and InDesign CS3 support when released for FREE.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
--
Users of FusionPro Desktop have unlimited free email support. Contact Printable 
Support at [EMAIL PROTECTED]
--
View FusionPro Knowledge Base, FusionPro Samples at
www.printable.com/vdp/desktop.htm

--
You are currently subscribed to fusionpro as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
--


--
Note:  All e-mail sent to or from this address will be received or otherwise 
recorded by the e-mail recipients of this forum. It is subject to archival, 
monitoring or review by, and/or disclosure to someone other than the recipient. 
Our privacy policy is posted on www.printplanet.com
--

Reply via email to