1 function show_my_receipt() {
2
3 // open the page as popup //
4 var page = 'http://www.test.com';
5 var myWindow = window.open(page, "_blank", "scrollbars=yes,width=400,height=500,top=300");
6
7 // focus on the popup //
8 myWindow.focus();
9
10 // if you want to close it after some time (like for example open the popup print the receipt and close it) //
11
12 // setTimeout(function() {
13 // myWindow.close();
14 // }, 1000);
15
16 }
1<button type="button" class="btn btn-success" onclick="show_my_receipt()">show the receipt</button>