PHP and Javascript - Automating print function of a page from another page

0

On my site, it has a screen for querying registered events. For each one, I have the Edit Event option, which redirects me to a form:

function editaEvento(val){
    var valor = val;
    location.href = "http://meusite.com.br/edicaoeventos?valor="+valor;
    // Função de edição pra abrir a página de formulário, semelhante ao do Index, mas que somente fará a edição
}
                    
asked by anonymous 22.06.2016 / 20:36

1 answer

0

Speak chará. You can create the Print button onclick="window.print ()" And in CSS use the css imagination with @media print I think the session case is complicated because the check is more complex, try to use the same print () and hide the fields that should not be shown in the print. Or else create an eventsimpressao.php? Idevento = and in this file configure the templates. Only it's more complicated. Ex:              @page {             size: A4;         }

@media print {
    body{max-width: 100%}
    thead {display: table-header-group;}//bug do firefox
    #btnSave{display:none;}
    #btnCancel{display:none;}

}

    
22.06.2016 / 22:54