简体   繁体   English

jQuery .post serialize()不发送创建的输入字段

[英]Jquery .post serialize() not sending created input fields

I have a form that is posting a for when you hit add to cart. 我有一个表格,当您点击添加到购物车时,该表格会发布。 it will add the new input fields for the options and everything then .post the form to update the pricing at the top....however when it does the post which is after it creates the fields it does not count those fields within the post and it is only for the newly created ones....you can see the running script at https://www.presidentialuniversity.com/synergy-business-tools/order_new.php?cid=1#top if you need more info don't hesitate to ask. 它将为选项和所有内容添加新的输入字段,然后将表单过帐以更新顶部的价格。...但是,当它执行过帐后(在创建字段之后)不计入帐内的这些字段并且仅适用于新创建的脚本。...如果您需要更多信息,可以在https://www.presidentialuniversity.com/synergy-business-tools/order_new.php?cid=1#top上查看正在运行的脚本。不要犹豫了。 you can see the javascript that pertains to this action at the bottom of: https://www.presidentialuniversity.com/synergy-business-tools/js/order_functions.js 您可以在以下网址的底部看到与此操作有关的javascript: https//www.presidentialuniversity.com/synergy-business-tools/js/order_functions.js

the portion that actually does the submitting is: 实际提交的部分是:

var form = $('#store');
url = form.attr('action');
$.post(url+'&a=updatecart', form.serialize(),function(data){
    alert(data);
    $('#top_totals').html(data);
}); 

currently it is alerting the post data. 目前,它正在警告帖子数据。 the fields go in with out a problem i can see them there they just aren't getting picked up when the form is posted 字段完全没有问题,我可以在那里看到它们,而在表单发布时它们不会被拾取

问题是,fadeIn动画正在显示新字段,而.post在该fadeIn完成之前正在运行,因此在序列化.post之前,这些字段未完全呈现

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM