2

I'm just wondering is it possible to open two tabs at the click of one button using window.open(). I have the following function:

$(".saleForm").on("click", ".btnPrintOrderBill", function(){

    var saleCode = $(this).attr("saleCode");

    window.open("extensions/tcpdf/pdf/food_order.php?code="+saleCode, "_blank");
    window.open("extensions/tcpdf/pdf/drink_order.php?code="+saleCode, "_blank");

})

and the following button:

<button type="submit" class="btn btn-primary pull-right btnPrintOrderBill" saleCode="<?php echo $value["code"]; ?>" value="hold" name="openTable">Hold</button>

At the moment it just opens the first link but does nothing for the second link.

coderguy
  • 31
  • 3
  • 1
    This might help: https://stackoverflow.com/questions/24364117/open-multiple-links-in-chrome-at-once-as-new-tabs – user2740650 May 16 '20 at 23:19

1 Answers1

0

This was fixed by adding http://localhost/ to the list of allowed pop-ups on chrome. I should have done it earlier !!!!

coderguy
  • 31
  • 3