On Tuesday, June 13, 2017 at 8:44:28 AM UTC-7, Alessio Varalta wrote: > > I send my data with this javascript > > $.ajax({ > url: url, > dataType: 'json', > type: 'POST', > contentType: 'application/json', > success: function (data) { > location.replace("{{=URL('sdfdsf','fsfsadf')}}?index=true"); > },error: function (error) { > alert("Si รจ verificato un errore durante il salvataggio"); > }, > data: { "order_of_day": order_of_day, "body": body,"date_start": > date_start,"date_end":date_end,"utenti":array_utenti_checked} , > }); > > I have tried > > data: JSON.stringify( { "order_of_day": order_of_day, "body": > body,"date_start": > date_start,"date_end":date_end,"utenti":array_utenti_checked} ) >
In the browser you're testing from, if you open Developer Tools to get the browser console, and look at the network tab for the ajax POST, can you see the data in the payload? Does it look right? I wouldn't expect the "stringify" method to help; I think it is primarily to give the JS function a string to print instead of the dictionary-like object JSON normally is. /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.