missing } in XML expression error in javascript


i consistently got an error in a simple js file :  missing } in XML expression

the js is:
function turnoff()

from firefox, the error is:  missing } in XML expression.

is there anything wrong in the above code?

Thanks so much for your help!
Who is Participating?
hieloConnect With a Mentor Commented:
The code you posted is not the problem. Check around the point where you are calling the function. If you are getting data via AJAX and using eval, make sure the data you are getting is "proper" javascript code. Meaning, look for missing/mismatched '}'
debuggerauConnect With a Mentor Commented:
looks fine to me, but its a function, not a XML expression...
b0lsc0ttConnect With a Mentor IT ManagerCommented:
Firefox would seem to be misinterpreting part of your code.  However I don't see an issue in the snippet you shared.  If you do have a simple example then post the complete page.  In some cases the line reported for the error is not really the cause.

lilyyanAuthor Commented:
hi, thanks for all replies. i just simply commented out the js file and the error is gone...
I wish I could comment out all my problems
All Courses

From novice to tech pro — start learning today.