Jump to content
xisto Community
Sign in to follow this  
eduard005

Javascript Error Error missing ) in parenthetical with JSON statment

Recommended Posts

Hello!
I'm trying to execute following code:

a=new Array();	a=eval("("+responseText+")");	for (prop in a) {		e=document.getElementById(prop)		if (e) {e.innerHTML=a[prop]}
and I recieve error in
a=eval("("+responseText+")");

what's wrong?
responseText it's result from php2js() function.

Apache 2.2.6/PHP5.2.5/MySQL 5.0.45

Share this post


Link to post
Share on other sites

Try changing

a=eval("("+responseText+")");
into
a=eval(responseText);
and see if that fixes the problem.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.