Which version are you using?
Please paste a sample of the JavaScript code having trouble.
If you are using 1.92, you need to check your JavaScript code for two things:
(1) all opening curly braces must have a whitespace (a space, tab, or newline) after them, and all closing curly braces must have whitespace before them (otherwise Expression Manager will think that your JavaSript code should be parsed as an Expression, and it will say that your variables are not defined.
(2) If you do any regular expression parsing within JavaScript, and your regular expressions use curly braces (like us_phone.match(/\d{3}-\d{3}-\d{4}/)), you can not use the in-line regular expression syntax. You must create a a new RegExp() object like this RegExp('/\d{3}-\d{3}-\d{4}/') and use it in the matching, otherwise expression manager will think that you are trying to evaluate {3}
/Tom