[jQuery] Re: What's the best way to pass parameters through jQuery's ajax?

2009-04-25 Thread Donny Kurnia
Thierry wrote: > Right now, I'm using jQuery's ajax like the following: > > function hello_world(param1, param2, param3, param4) > { > $.ajax( > { > type: 'POST', > url: 'foo.php', > dataType: 'html', > data: 'param1=' + param1 + '¶m2=' + param2 + '¶m3=' +

[jQuery] Re: What's the best way to pass parameters through jQuery's ajax?

2009-04-24 Thread imrane...@gmail.com
I think going on json way is much better function hello_world(param1, param2, param3, param4) { $.ajax( { type: 'POST', url: 'foo.php', dataType: 'html', data: {param1 : param1_value, para2 : param2_value, param3 : param3_value}, success: function(d

[jQuery] Re: What's the best way to pass parameters through jQuery's ajax?

2009-04-24 Thread Dexter's Brain
JSON will work efficiently, Else, you can pass an XML String which you can parse and extract parameters thru your PHP code. Thanks, Dexter. On Apr 24, 11:58 pm, "imrane...@gmail.com" wrote: > I think going on json way is much better > > function hello_world(param1, param2, param3, param4) > { >