Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
带有表单序列化的Jquery ajax未调用操作类。它在数据字符串中追加了%5B0%5D_Jquery_Ajax - Fatal编程技术网

带有表单序列化的Jquery ajax未调用操作类。它在数据字符串中追加了%5B0%5D

带有表单序列化的Jquery ajax未调用操作类。它在数据字符串中追加了%5B0%5D,jquery,ajax,Jquery,Ajax,在我的action类中,我有一个复杂对象的列表。 从Jsp中,我尝试序列化表单并发送。 但它并没有调用action类,错误是从服务器端抛出的。因为表单元素名称包含[] 序列化的值为 授权.organizationId=2801&Rightage.organizationName=asjaj&Rightage.productNumber=pr1&Rightage.productName=QC&Rightage.productType=&Rightage.eon=sd&Rightage.Righta

在我的action类中,我有一个复杂对象的列表。 从Jsp中,我尝试序列化表单并发送。 但它并没有调用action类,错误是从服务器端抛出的。因为表单元素名称包含[]

序列化的值为

授权.organizationId=2801&Rightage.organizationName=asjaj&Rightage.productNumber=pr1&Rightage.productName=QC&Rightage.productType=&Rightage.eon=sd&Rightage.Rightage.Type=DEV&Rightage.Rightage状态=AVAIL&Rightage.effectiveDate=02-04-2016&Rightage.expirationDate=02-04-2016&Rightage.Rightment数量=122&权利.productActivationCode=GGGGGG和权利.supportEndDate=02-19-2016和权利.quantityUnderSupport=&Rightage.AuthentityIDEXT=&Rightage.saidList%5B0%5D.saId=aaa和权利.saidList%5B0%5D.startDate=02-16-2016和权利.saidList%5B0%5D.endDate=02-24-2016和权利.saidList%5B0%5D.quantityUnderSupport=555和权利.saidList%5B0%5D.externalSAID=&权利。saidList%5B0%5D.endDate=&权利。saidList%5B0%5D.endDate=&权利。saidList%5B0%5D.endDate=

请帮忙我被困了两天

从我的javascript

var dataString =  $("form").serialize();                         
$.ajax({
    type: "POST",
    url: "EntitlementAction_submitNewEntitlement",
    data: dataString,
    traditional: true,
    async: false,
    cache: false,
    success: function(result) {
        alert(result);
        $("#summaryreport").html(result);
    },
    error: function(error) {
        //alert('<s:property value="%{getText(\'config.alert45\')}" />');
    }
});
var dataString=$(“form”).serialize();
$.ajax({
类型:“POST”,
url:“权利行动\提交实体”,
数据:dataString,
传统的:是的,
async:false,
cache:false,
成功:功能(结果){
警报(结果);
$(“#总结报告”).html(结果);
},
错误:函数(错误){
//警报(“”);
}
});

在eclipse调试模式下,控件不会进入action类

请编辑您的帖子,以便更好地阅读。到目前为止你试过什么?发生了什么错误?我将struts与jquery结合使用。。从我的jsp中,我可以动态地创建行。然后ajax将整个表单发布到action类。。它在action类中没有填充值,在debug modevar dataString=$(“form”).serialize()中没有运行的action类方法;$.ajax({type:“POST”,url:“authenticmentaction_submitneventitlement”,数据:dataString,传统:true,异步:false,缓存:false,成功:函数(结果){alert(结果)$(“#summaryreport”).html(result);},错误:函数(error){//alert(“”);}});如果不查看配置文件和/或源代码,就无法获得帮助。