Hi. I hope someone could help me.
When i load an external php that generates a set of fields, i have no problems, but then i send the generated form, i can not access the vars.
There is the code i user:
For load the external file:
$.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>
The file loaded have this code:
echo '<input name="campo" type="hidden" value="valor" />';
and the php file that receive the form have this code:
die("campo: ".$_REQUEST['campo']);
I really will appreciate a lot the help.
Thnx in advance.
Yannick