Proverò questa strada, in effetti volevo usare librerie json dall'inizio ma negli script non sono riuscito ad importarle e volevo evitare un external method.
Grazie a tutti per l'aiuto, comunque, in particolare a te Riccardo. Ho imparato varie cose in questo giro di mail! 2010/4/13 Riccardo Lemmi <[email protected]> > 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: [email protected] > Reflab S.r.l. - Plone Design, Development and Consulting > Phone: +39 349 4620820 http://www.reflab.it > > _______________________________________________ > Plone-IT mailing list > [email protected] > http://lists.plone.org/mailman/listinfo/plone-it > http://www.nabble.com/Plone---Italy-f21728.html >
_______________________________________________ Plone-IT mailing list [email protected] http://lists.plone.org/mailman/listinfo/plone-it http://www.nabble.com/Plone---Italy-f21728.html
