| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
WHOA!
Join Date: Jun 2005
Location: Toronto, Canada
Posts: 61
|
JSON help - eval produces syntax error
I'm trying to evaluate a JSON response but I'm getting a syntax error: Code:
The response itself looks like this: Code:
The process is simple: 1. I post some form data a la Ajax to a template 2. Posted data gets processed by a proprietary server side language (the company I work for uses their own homebrew programming language). 3. If everything goes well the new data to gets written to the template like this: Code:
4. When the XMLHttpRequest object's status is 200 and readystate is 4 I eval() the response text (JSON data) Despite the syntax error, if I do something like this: Code:
... Firefox logs the syntax error BUT an alert pops up with the username value. So, syntactically, something is awry but I am actually getting back an object that I can access. Any ideas on how to get rid of the syntax error? |
|
|
|
|
|
#3 (permalink) | |
|
WHOA!
Join Date: Jun 2005
Location: Toronto, Canada
Posts: 61
|
Quote:
See here: http://www.thescripts.com/forum/thread499662.html ...the error that I was receiving seems to have magically disappeared: I have no idea why but it has. So I'll leave it at that. Thanks tho stickmus... |
|
|
![]() |