[PHP] Re: Print Question
I wasn't in the office hence haven't visited this group for a while... Here's an idea though I still may not understand the whole situation but from what I think it is here goes: I guess you will have to mix javascript and php in the following manner... use onclick for a particular HTML variable and create a function in Java Script that runs when you click this and returns true or writes to an HTML variable say input type= hidden name=hasClicked value=false... the HTML value will give this hidden variable the value true when clicked otherwise it will be defaulted at false... You can use document.write.formName.hasClicked.value = true... Then continue with: if($hasClicked == "true") Run the Script... This will mean your script won't run until OK is pressed... I hope this helps and I hope its not too late... Spike... "Chris Kay" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... Question I have is I want to run a print job of 200+ invoices I have a javascript code to open a print dialog box and Then go to next invoice and do the loop.. Problem I am having is that I want it to pause if the ok button on the dialog Box is not pressed.. When I run the script it fly's throught and brings up a heap of printer Dialog boxes which causes me to ctrl+alt+del... Anyway or pausing the script untill ok is pressed? Thanks in advance.. --- Chris Kay Technical Support - Techex Communications Website: www.techex.com.au Email: [EMAIL PROTECTED] Telephone: 1300 88 111 2 - Fax: (02) 9970 5788 Address: Suite 13, 5 Vuko Place, Warriewood, NSW 2102 Platinum Channel Partner of the Year - Request DSL - Broadband for Business --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Print Question
>Question I have is > >I want to run a print job of 200+ invoices > >I have a javascript code to open a print dialog box and >Then go to next invoice and do the loop.. > >Problem I am having is that I want it to pause if the ok button on the >dialog >Box is not pressed.. > >When I run the script it fly's throught and brings up a heap of printer >Dialog boxes which causes me to ctrl+alt+del... > >Anyway or pausing the script untill ok is pressed? I doubt it... And you're real unlikely to find the answer on a PHP mailing list, as noted. Some things you might consider. Use PHP to concatenate all the invoices with a "new page" character (control-L, I think) between them. That's probably only gonna work on an old dot-matrix printer, though... Use PHP to shove all the invoices into a single PDF http://php.net/pdf Use PHP to shove all the invoices into some kind of word-processing program format with page breaks between them. I imagine that if they are simple enough, you could even do a sample MS Word and reverse-engineer the format of the document enough to get it right. Use PHP to spew out the invoices in tab-delimited format, one per row, and download that, and then use Word's "template" or "mail-merge" or whatever they called it to print them up. Oh, I suppose you could use JavaScript with some kind of timer loop so I can click on the "Ok" button as fast as you pop up the stupid windows, but do you really expect me to click 200+ times for your stupid print button to work? Isn't it weird how all my good answers started with "Use PHP?" :-) :-) :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php