[Proto-Scripty] Re: ajax.updater - json to fill select

2011-06-06 Thread Eric
Hello, This is a little out of topic, but here are few hints: The easiest way to do that is to build a PHP array, and to use JSON_Encode to convert it into a JSON encoded string; You also need to change the content-type of your response to let prototype know it is actually JSON. Simple example:

Re: [Proto-Scripty] Re: ajax.updater - json to fill select

2011-06-06 Thread Bertilo Wennergren
Eric lefauv...@gmail.com wrote: The easiest way to do that is to build a PHP array, and to use JSON_Encode to convert it into a JSON encoded string; Yes, that's the right way. If you aim for an associative array you should however watch out for a particular gotcha: If such an array has