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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

looks fine to me, but its a function, not a XML expression...
b0lsc0ttIT 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.

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 '}'

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.