我希望有人能帮助我。用jquery加载动态外部表格
当我加载生成一组字段的外部php时,我没有问题,但然后我发送生成的表单,我无法访问变量。
有代码我用户:
对于负载的外部文件:
$.ajax({
type: "POST",
url: "product-insert.php",
contentType: "application/x-www-form-urlencoded",
global: true,
processData:true,
dataType: 'html',
data: {num_filas: $("#num_filas").val()},
success: function(html){
$("#destino").html(html);
alert(html);
str = $("ofertas").serialize();
},
error: function(){
},
complete: function(){
}
});
<form action="ofertas.php" method="post" enctype="multipart/form-data" name="form-ofertas" id="ofertas" >
<div id="destino"></div>
加载的文件有以下代码:
echo '<input name="campo" type="hidden" value="valor" />';
和php fil e收到表格有这样的代码:
die("campo: ".$_REQUEST['campo']);
我真的很感激很多的帮助。
Thnx提前。
雅尼克
需要更完整的数据。你在哪里加载它?你在哪里发布?如果做得对,它应该工作。 – 2010-06-29 21:47:55
你正在提交的'
@Kerry“如果做得不错,它应该工作”是我当天的引用;)@Sauron你的意思是“无法访问变量”?什么时候? – 2010-06-29 21:52:14