0
In my directory I have the following pages in HTML: public_html // Index.html // proof_protocol.html // protocolo_menu.html
On the "protocolo_menu" page we set up a form. The goal is that after giving the Ubmit in the form open the page "comprovante_protocolo" in a new tab. The code for the protocol data to be recorded is:
function EditarCadastrarProtocolo() {
if (document.getElementById("idProtocolo").value == "") {
AdicionarProtocolo();
} else {
EditarProtocolo(document.getElementById("idProtocolo").value);
}
}
function AdicionarProtocolo() {
var cod = GerarIdProtocolo();
$("#idProtocolo").val(cod);
var select = document.getElementById("clienteProtocolo");
var clienteSelecionado = select.options[select.selectedIndex].value;
var protocolo = JSON.stringify({
codigo: cod,
data: $("#dataProtocolo").val(),
codCliente: clienteSelecionado,
observacoes: $("#observacoes").val()
});
tbProtocolos.push(protocolo);
localStorage.setItem("tbProtocolos", JSON.stringify(tbProtocolos));
alert("Protocolo " + cod + " Cadastrado com Sucesso!");
ListarProtocolos();
}
I am trying to make that after Submit the "comprovante_protocol.html" page opens in a new tab, where a form will be presented with the registered data and other information to be delivered to the customer and signed. I thought I’d put the code like this:
' if (Document.getElementById("idProtocolo").value == "") { AdicionarProtocolo(); open window.......;'
It didn’t work out and I couldn’t find anything like it on the Internet, does anyone have any idea how to do it?
Most web users do not view pop-us since most browsers have a built-in mode for blocking. Will your popup not fall in this scenario?
– user60252