0
I need to send some information to another page for printing, I have already been able to validate the information, but I don’t know how to call the other page and print the data provided by the user. What I got is this:
The validation:
$(function() {
$('#frmCadastro').validate({
rules: {
Unicoop: {
required: true
},
Empregado: {
required: true
},
CTPS: {
required: true
},
SCTPS: {
required: true
},
Dias: {
required: true
},
Data: {
required: true
}
},
// Messages for form validation
messages: {
Unicoop: {
required: ''
},
Empregado: {
required: ''
},
CTPS: {
required: ''
},
SCTPS: {
required: ''
},
Dias: {
required: ''
},
Data: {
required: ''
}
},
submitHandler: function(form) {
var data = $(form).serialize();
//event.preventDefault();
$.ajax({
url: "pImprimeTermoProrrogacao.php",
type: 'POST',
datatype: 'json',
data: data,
success: function(data) {
console.log(data);
}
});
return false;
}
});
});
My.log() console shows me what needs to be on the other page for printing.
<table width="80%" border="0" align="center">
<tbody>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="3">Por mútuo acordo que fazem a EMPRESA TAL, Estabelecimento NOME EMPRESA, devidamente inscrito no CNPJ sob o nº XX.XXX.XXX/XXXX-XX situado à Rodovia BR 376 Km 395, na cidade de CIDADE, Estado do PR, doravante denominada simplesmente EMPREGADORA, e o Sr Rafaela Santos de Souza, portador da Carteira Profissional nº 2545-89 Série 48512, a seguir denominado simplesmente EMPREGADO, fica o Contrato de Experiência por esta assinado, que deveria vencer nesta data, prorrogado por mais 50 dias, com data definitiva de 08/08/2017.</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
impossible to do qq test with the displayed codes
– user60252