Q:

value not posting to php script

step1 batch: (drop down ) in dynamically loaded, after selecting one of the value from dropdown step 2 is loaded by ajax call, in setp 2 when i click on edit button, step 3 is loaded via ajax call again.   in step 3 when i click on edit button ajax call is working fine but its not posting the value to php script.  
             //ajax call
             function validateFees(strAddNo) {  

          var collectFees = $("#collectFees").val();
          if(collectFees == "")
{
    $("#validateFeesResult").html('<div class="info">Please enter your Fees Amount.</div>');
    $("#collectFees").focus();
}

else
{
    var dataString = 'collectFees' + collectFees + 'strAddNo' + strAddNo;
    $.ajax({
        type: "POST",
        url: "validateFees_script.php",
        data: dataString,           
        cache: false,
        beforeSend: function() 
        {
            $("#validateFeesResult").html('Loading...');
        },
        success: function(response)
        {
            $("#validateFeesResult").hide().fadeIn('slow').html(response);
        }
    });
}

}  
I'm sure it's extremely simple but I'm not understanding how to do it? 

A:

Change the data format as:
var dataString = 'collectFees=' + collectFees + '&strAddNo=' + strAddNo;

Check out : http://api.jquery.com/serialize/

