This sends two pieces of data
Create two variables called : – idno and newbudgetamount
They will send as a GET and be read like
myweb.com/page.php/?panelid=337&newbudgetamount=newbudgetamount
1 2 3 4 5 6 7 8 9 10 11 12 13 |
//ajax call $.ajax({ url: "testpanelnum.php", dataType: "html", type: 'POST', data: "panelid=" + idno+ "&newbudgetamount=" + newbudgetamount, success: function(data){ $(".newbudgetresponse").html(data); alert(data); } }); //end ajax |
To send all form values
var formvars = $(“#form1”).serialize(); // add this
and change this : –
“data: “panelid=” + idno+ “&newbudgetamount=” + newbudgetamount,”
To this: – data: formvars,
And to send in json format which also works as simple POST
1 2 3 |
data: {accountid: accid , tagname: tagchose}, |