Hi, I'm struggling a bit to get $.post to work. I can get it working as documented, ie.
$.post("url", { param1: 1, param2: 2 } );
but I want variable fields on my form (identified by the class 'edit_field') to be posted to the url I thought the approach below would work, postdata is built correctly, but it sends nothing.
What  am I doing wrong?
thanks

 var postdata = [];

 // get all the edit fields
 $.each($('.edit_field'),function() {
   postdata[this.name] = $(this).val();
 });

 // and sent it away
 $.post("/spt/newcanonical",
        postdata,
        function(data) {
          alert(data);
        });


Reply via email to