Fpdf will be opened in a new window

1

my pdf is created correctly but what I want is that it will be in a new window This is my code but I will open it in a new tab and not in a window

   <input type="submit" Value="Ver Reporte" name="" class='btn btn-success'  onClick="document.formulario.action='verPDF.php'; document.formuario.submit()"  ;> 
    
asked by Daniela 07.06.2018 в 19:42
source

1 answer

1

You can simulate a button with the HTML <a> element to achieve it. Why use <a> ? Because it has a property called target that allows you, among other things, to achieve what you want to generate the document from another window in your browser. The target="_blank" property indicates that your javascript code of onClick is executed in a new browser tab.

To do this you transform your input into the following code:

<a type="button" href="#" value="Ver Reporte" target="_blank" class='btn btn-success'  onClick="document.formulario.action='verPDF.php'; document.formuario.submit();"></a>

Then using CSS you can delete the blue color of the letter by being a link, the underline, among other things that you do not like.

I hope it helps. Greetings!

    
answered by 08.06.2018 в 10:25