On Tuesday 13 April 2010, you wrote:
> ...
> Usando jquery 1.3.2 FUNZIONA tutto. Il dubbio mi è venuto leggendo questo:
>
> *Important:* As of jQuery 1.4, if the JSON file contains a syntax error,
> the request will usually fail silently. Avoid frequent hand-editing of JSON
> data for this reason. JSON is a data-interchange format with syntax rules
> that are stricter than those of JavaScript's object literal notation. For
> example, all strings represented in JSON, whether they are properties or
> values, must be enclosed in double-quotes. For details on the JSON format,
> see http://json.org/.
>
> Assurdo. Evidentemente quello che il pythonscript gli ritorna non è JSON
> cosi puro come credevo, nonostante firebug riesca a elaborarlo come
> tale...A qualcuno viene in mente un workaround per questa cosa? O magari
> avreste scritto il return del mio  script diversamente?

http://www.json.org/
http://www.json.org/example.html

Le funzioni dovrebbero ritornare 'object' cioè un dizionario, lo script 
ritorna un 'array', dovrebbe essere una cosa tipo:

return { "items": [     
            {"optionValue":"03", "optionDisplay":"roma"}
         ]
       }

comunque per essere tranquilli si deve usare una libreria json.
-- 
Riccardo Lemmi                           Email:   ricca...@reflab.it
Reflab S.r.l. - Plone Design, Development and Consulting
Phone: +39 349 4620820                         http://www.reflab.it

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Plone-IT mailing list
Plone-IT@lists.plone.org
http://lists.plone.org/mailman/listinfo/plone-it
http://www.nabble.com/Plone---Italy-f21728.html

Reply via email to