You can use this... // Converts parameter array received from serializing the form into JSON $.params2json = function(d) { if (d.constructor != Array) { return d; } var data={}; for(var i=0;i<d.length;i++) { if (typeof data[d[i].name] != 'undefined') { if (data[d[i].name].constructor!= Array) { data[d[i].name]=[data[d[i].name],d[i].value]; } else { data[d[i].name].push(d[i].value); } } else { data[d[i].name]=d[i].value; } } return data; };
On 5/1/07, Erik Beeson <[EMAIL PROTECTED]> wrote:
How about (untested): $.get("page.php?" + $("input").serialize()); --Erik On 4/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Is there a way to easily convert a string of parameters > [name=John&location=Boston] into key/value pairs [{name: "John", > location: "Boston"}]? I found the FastSerialize plugin, but it claims > that the native one is much faster, and doesn't require the extra > plugin code. What I want to be able to do, is just do > $.get("page.php",$('input').serialize()), just like you can in the > FastSerialize plugin. > >
-- Reach1to1 Technologies http://www.reach1to1.com http://on2.biz [EMAIL PROTECTED]