We have an old project PHP
and JS
that worked on Wamp 2.2.
with no errors. I do not know much about JS
or PHP
and we need to make a small change.
To update the project, the idea is to update to wampserver 3.0
, but the same code started to generate an error that I think has to do with updating made from Wamp
.
On the screen where products are selected, the function that is called when clicking on the product line to edit it, now returns an error as if it were not defined:
ReferenceError: produto_editar is not defined
Reference in the table:
<a class="ir editar" onclick="produto_editar('.$res['id_produto'].');" > > <b>title="Editar dados do produto">Editar registro</a>
Function:
//Função envia página edição do produto
function paciente_editar(valor){
var pedido_request = new Request({
'method':'post',
'noCache':false,
onComplete:function(a){
location.href ="cadastro_produto.php?acao=editar&id=" + valor;
}
});
pedido_request.send('');
}