Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Javascript Error, Error "missing ) in parenthetical" with JSON statment
eduard005
post Jan 6 2008, 02:18 PM
Post #1


Newbie
*

Group: Members
Posts: 1
Joined: 6-January 08
Member No.: 55,825



Hello!
I'm trying to execute following code:
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
CODE
a=eval("("+responseText+")");


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

Apache 2.2.6/PHP5.2.5/MySQL 5.0.45
Go to the top of the page
 
+Quote Post
truefusion
post Jan 6 2008, 11:16 PM
Post #2


Ephesians 6:10-17
Group Icon

Group: [MODERATOR]
Posts: 1,916
Joined: 22-June 05
From: The World of Gentoo
Member No.: 8,528



Try changing
CODE
a=eval("("+responseText+")");
into
CODE
a=eval(responseText);
and see if that fixes the problem.
Go to the top of the page
 
+Quote Post
gogoily
post Jan 12 2008, 03:16 AM
Post #3


Advanced Member
*******

Group: Members
Posts: 101
Joined: 30-October 05
Member No.: 13,571



Try this:
CODE
a=eval("["+responseText+"]");
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Javascript Slideshow Tutorial(4)
  2. Javascript Close Window(15)
  3. One Click Copy And Paste To Clipboard(5)
  4. Adding Rows & Columns In Html Table Using Javascript(1)
  5. I'm Making My Own Javascript Only Rpg :d(7)
  6. What Is Json? ,how It Works?(4)
  7. What's The Relationship Between Javascript And Java(5)
  8. Javascript : No Right Click Script !@(12)
  9. Hiding <div> Boxes With Javascript(8)
  10. Highlight A Word In Javascript. Help!(2)
  11. How Do You Make A Javascript Calculator?(11)
  12. Help With Javascript Calculator Returning "nan"(2)
  13. Great Javascript Script Source(2)
  14. Web Applications: J2ee Or Javascript/css/html(1)
  15. Opera Browser + Javascript + Embeded Sound(0)
  1. Javascript - What's Your Browser?(3)
  2. Javascript Events Not Working For Ie(6)
  3. Lightbox Js Error In Opera(2)
  4. I`m New To Javascript.(5)
  5. Special Wii Javascript(2)
  6. Is It Possible To Create A Web Based Mmo In Javascript?(4)
  7. Capturing Username Of Computer(3)
  8. Javascript Object Node Referencing Help(5)
  9. Flash And Javascript Interaction(1)
  10. Document.write & Noscript Questions (javascript)(1)
  11. Java Vs Javascript(11)
  12. Adjusting Rows/cols Of Frames In Frameset Using Javascript Is Not Working In Firefox 3 Is Not Working(4)
  13. Need Help With Javascript Drag And Drop Script(2)


 



- Lo-Fi Version Time is now: 6th October 2008 - 02:44 PM