Friday, October 31, 2014

jQuery deal with post data




To deal with .post in jQuery
var tutorialID = 1;
            $.post('data_process.php',
                {funct:'updateSITA',
                tutorialID:tutorialID,
                course_id:course_id,
                courses_offered_id:courses_offered_id,
                section:section,
                ta:ta,
                type:type,
                 status:status}, function(data){
                formatJson(data, "div#notice", null);
            });


In  data_process.php, we can hand data from post, i.e. $_POST
for example $_POST['funct']
if($_POST['funct'] == "updateSITA") {

No comments:

Post a Comment