On Tue, Sep 15, 2009 at 12:47, Bernardo Botelho <bernardo...@gmail.com> wrote: > Hello everyone, > > I'm using the post ajax function with jQuery sending info to a web2py > controller so he can handles with the database manipulation according the > received information from the jQuery post. For the callback function, I need > tow send a list with tow indexes (0 and 1) with 2 strings. So i created the > list at the controller and returned it expecting that the callback function > will understand it as an array of two elements. But it received an string > such as ['value1','value2']. I would like to know if there is a way to > return to the callback function that list and it receives and compreend that > as an array. > > Thanks > > -- > Bernardo Botelho Fontes > bernardo.bote...@peta5.com.br > (21) 9629 1621
Bernardo, you should use JSON[1] to this. jQuery and web2py have built-in support for JSON, so you could return JSON via web2py and read it with jQuery without problems. [1] http://www.json.org/ -- Álvaro Justen Peta5 - Telecomunicações e Software Livre 21 3021-6001 / 9898-0141 http://www.peta5.com.br/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---