PDA

View Full Version : Missing ) in parenthetical



Phpex
26 Nov 2007, 6:09 AM
First of all i've searched for this error in this forum and google a lot. I've tried all the solutions told before.

I load a form when a user clicks on a treeview. There's no problem on request. I checked out it. There's no problem on form elements' name, they are ready for json data.

I changed the Json data so much. Here's some of my tests :



stcCallback1004({"success":true,"item":{"id":"113630","title":"Fiat","metin":"Fiat is an Italian brand..."}});

stcCallback1004({"success":true,"item":[{"id":"113630","title":"Fiat","metin":"Fiat is an Italian brand..."}]});

stcCallback1004({"success":true,"item":["id":"113630","title":"Fiat","metin":"Fiat is an Italian brand..."]});

stcCallback1004(["success":true,"item":["id":"113630","title":"Fiat","metin":"Fiat is an Italian brand..."]]);

etc. etc.


It sometimes says "invalid property id" but most it says missing ) in parenthetical.

krukow
26 Nov 2007, 7:25 AM
You probably want:



stcCallback1004({"success":true,"items":[{"id":"113630","title":"Fiat","metin":"Fiat is an Italian brand..."},
{...}, ...]});
Further you may have problems with the ids, you can leave them out unless you really need them.

Phpex
26 Nov 2007, 7:55 AM
Form needs only one array.

Phpex
26 Nov 2007, 10:11 AM
I'm not sure about this situation but i found that if a remove the callback param from my json response there's no error. I do response like this :



{"success":true,"item":[{"id":"113630","title":"Fiat","metin":"Fiat is an Italian brand..."}]}


There's no missing ) in paranthetical error at this time.

This cause can be my fault that i didn't wrote a callback function to form.load method.

26 Nov 2007, 10:43 AM
Form needs only one array.

Absolutely correct.

You don't need the STC Callback parameter from the submit function - which uses Ext.Ajax.

Asadjan
9 Apr 2010, 3:58 AM
I was getting the same error message when I was submitting my form to the PHP file. Just used the statement, standardSubmit :true, and everything went well.

Enjoy
javed

Asadjan
16 Apr 2010, 5:02 AM
Hello Everyone, there is one more thing I found out today in my php script regarding the error ; 'Missing ) in parenthetical'. If you use print or echo statement just to display your output then you will get this error. In my case I commented all the print statements and I don't get this message anymore. I am not sure if this is the right solution but at least fix the problem.