Good morning, I have a problem on my page.
I created a Form with a comment field. When clicking the button it "should" call the function but does not call.
function gravaobs(pag_pedido, obs_boleto, stats)
{
if (obs_boleto.length == 0)
{
alert('Por favor, preencha a observação');
document.formobs.observacao.focus();
return;
}
else
{
var param = {'pag_pedido': pag_pedido, 'obs_boleto': obs_boleto, 'status': stats};
OpenWindowWithPost('tela_de_tratamento.php', '', 'NewFile1', param);
}
}
<form id="formobs" name="formobs">
<table style='width: 1220px;'>
<tr>
<td align='center' style='padding:5px 0 10px 0; font: 12pt Trebuchet MS; color: #00471A; margin:0 auto;'> Inserir Obs.:</td>
<td align='center' style='padding:5px 0 10px 0; font: 12pt Trebuchet MS; color: #00471A; margin:0 auto;'><input style='width: 975px;' id='observacao' name='observacao' type='text' maxlength='250' tabindex='4' size='137'/></td>
<td style='font-size:14px; text-align:left;'><br/></td>
<td align='center'><p class='botao'><a href='#' title='Gerar' onclick="javascript:gravaobs(<?php print $pag_pedido; ?>, document.formobs.observacao.value, <?php print $status; ?>);"></a></p></td>
</tr>
</table>
</form>
All variables are normal and even (putting php echo variables) they appear normal, but I do not know why it does not work
Can anyone help me?