var options = ''; for (var i = 0; i < p.length; i++) { options += '<option>' + p[i] + '</option>'; } $('#installedPrinters').css('visibility','visible'); $('#installedPrinterName').html(options); $('#installedPrinterName').focus(); $('#loadPrinters').hide(); }else{ alert("No printers are installed in your system."); } } function wcpGetPrintersOnFailure() { // Do something if printers cannot be got from the client alert("No printers are installed in your system."); } </script> <!-- Add Reference to jQuery at Google CDN --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script> <?php //Specify the ABSOLUTE URL to the php file that will create the ClientPrintJob object //In this case, this same page echo WebClientPrint::createScript(Utils::getRoot() . '/scolav2/webClientPrint/printTicket.php'); ?> </body> </html>