值不张贴到PHP脚本


value not posting to php script

step1 batch:(下拉)在动态加载,选择一个值从下拉步骤2是通过ajax调用加载后,在set2当我点击编辑按钮,步骤3是通过ajax调用再次加载。在步骤3中,当我点击编辑按钮ajax调用工作正常,但它不是张贴值到PHP脚本。

             //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);
        }
    });
}

}

我相信这是非常简单的,但我不明白如何做到这一点?

将数据格式更改为:

var dataString = 'collectFees=' + collectFees + '&strAddNo=' + strAddNo;

查看:http://api.jquery.com/serialize/