Closed Bug 164388 Opened 22 years ago Closed 22 years ago

JavaScript print function kills printer spooler

Categories

(Core :: Printing: Output, defect)

x86
Windows NT
defect
Not set
major

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: base12, Assigned: rods)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1b) Gecko/20020823 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1b) Gecko/20020823 Searchable databases from silverplatter.com allow you to print search results. Using check boxes you can select those items you want to print. Then you click on a print button (not the browser's print button, but one embedded in the Web page itself). Clicking the print button appears to invoke a JavaScript function. This opens the print dialog box. Then clicking the print button in the dialog box just causes the printer spooler to die. All subsequent print jobs from all applications fail until the spooler is restarted. Reproducible: Always Steps to Reproduce: 1. Do a database search at silverplatter.com 2. Click the print button after search results are returned 3. Actual Results: Printer spooler died Expected Results: Search results should have printed out Interestingly printing seems to work OK in Netscape 6.2.1, but fails in Netscape 6.2.3. I've tried to print in Mozilla 1.0 and various nightly builds of Mozilla 1.1b, and it always fails. This has been tried on Windows NT and Windows 2000. In order to search the silverplatter.com databases, you need an account (not free). If you want to investigate this problem further, I can probably arrange for you to access the databases. I know little enough about JavaScript that I can't say with any certainty that the problem really isn't with the site's coding. If it will help, here's the page source that contains the JavaScript frint function. This is the source of a single frame of the entire page. The problematic code seems to be "function printRecords()". <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN"> <html> <head> <title>print options top</title> <link href="notunderlined.css" type="text/css" rel="stylesheet"> <script language="JavaScript"> function printRecords() { if (validateRange()) { with (parent.content.document.forms[0]) { action="previewBriefRecordsHidden.ws"; view_origin.value = "main_view"; target="preview"; method="get"; // Need to set method to get to get Netscape 4.7 to print submit(); } } } function changeOptions() { with (parent.content.document.forms[0]) { action="changePrintOptions.ws"; view_origin.value = "main_view"; target="ws_topFrame"; method="post"; submit(); } return false; } function previewRecords() { if (validateRange()) { with (parent.content.document.forms[0]) { action="previewBriefRecords.ws"; view_origin.value = "main_view"; target="ws_topFrame"; method="post"; submit(); } } } function validateRange() { with (parent.content.document.forms[0]) { var minValue = parseInt(min.value); var maxValue = parseInt(max.value); var allValue = parseInt("4084"); var limit = -1; if (minValue < 1 || maxValue < 1) { alert ("Minimum and maximum record numbers must be greater than zero."); return false; } else if (maxValue < minValue) { alert ("The minimum record number can not be greater than the maximum record number."); return false; } else if (minValue > allValue || maxValue > allValue) { alert ("The minimum and maximum record number can not be greater than the number of records in the set."); return false; } else if (limit != -1 && ((range[0].checked == true && allValue > limit) || (range[1].checked == true && (maxValue - minValue + 1) > limit))) // No marked range yet { alert ("The selected range is over the limit set by the administrator on the number of records that can be output."); return false; } } return true; } </script> </head> <body topmargin="0" leftmargin="0" bgcolor="#FFFFFF"> <form name="main" method="post"> <table border="0" cellpadding="2" bgcolor="#808080" width="100%" cellspacing="0"> <tr> <td nowrap bgcolor="#990000" align="left" valign="middle"> <img border="0" src="images/en/splogo19_ico_w.gif" width="19" height="19"> <a href="javascript:top.showAboutWindow('showAbout.ws')"> <img border="0" src="images/en/aboutwebspirs_r.gif" hspace="6" width="190" height="19"></a> </td> <td align="right" nowrap bgcolor="#990000" valign="middle"> <font color="#FFFFFF"> <a href="javascript:top.showGuideWindow('showGuide.ws')" class="top">Database Guide</a> | <a href="javascript:top.openHelp('/webspirs/')" class="top">Help</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="logout.ws" class="top" target="ws_topFrame" onclick="top.clearClientSideTimeout();top.closeAllPopupWindows()"> Logout </a> &nbsp;&nbsp; </font> </td> </tr> </table> <table border="0" cellspacing="0" bordercolor="#FFFFCC" width="100%" bgcolor="#FFFFCC" cellpadding="3"> <tr> <td bordercolor="#FFFFCC" bgcolor="#FFFFCC" nowrap><font face="arial,helvetica" size="2" color="#000000"><b>Print Options</b></font></td> <td bordercolor="#FFFFCC" bgcolor="#FFFFCC"> <a href="defaultPrintOptions.ws" target="content"> <img border="0" src="images/en/defaultsettings_b_y.gif" alt="Re-set print options" hspace="3" width="125" height="20"> </a> </td> <td bordercolor="#FFFFCC" bgcolor="#FFFFCC" width="100%"> <a href="javascript:previewRecords()"> <img border="0" src="images/en/preview_b_y.gif" alt="Print Preview" hspace="3" width="70" height="20"> </a> </td> <td bordercolor="#FFFFCC" bgcolor="#FFFFCC"> <a href="javascript:printRecords()"> <img border="0" src="images/en/print_b_y.gif" alt="Print" width="42" height="20" hspace="3"> </a> </td> <td bordercolor="#FFFFCC" bgcolor="#FFFFCC"> <a href="javascript:changeOptions()"> <img border="0" src="images/en/backarrow_b_y.gif" alt="Back to results" width="53" height="20" hspace="3"> </a> </td> <td valign="middle" align="right" bgcolor="#FFFFCC" width="100%"> <table border="0" cellpadding="2" cellspacing="0"> <tr> <td><select name="main" size="1" onchange="top.openHowDoIFromForm(this.form)"> <option value="none">How do I ...?</option> <option value="hdi_print.htm">... print records</option> <option value="hdi_print_change.htm">... specify the records to print</option> <option value="hdi_print_format.htm">... change the format</option> <option value="hdi_print_preview.htm">... preview the print</option> </select>&nbsp;</td> </tr> </table> </td> </tr> </table> </form> </body> </html>
reporter (Andy): can you reproduce this bug with a recent build of mozilla? if so, please comment again with details. if not, please resolve this bug as WORKSFORME. thanks.
Not a DOM problem, over to printing...
Assignee: jst → rods
Component: DOM Level 0 → Printing
QA Contact: desale → sujay
Summary: JacaScript print function kills printer spooler → JavaScript print function kills printer spooler
No response from reporter for >30 days. resolving WORKSFORME. Reporter: If you can reproduce this with a recent build of Mozilla, then please reopen this bug and give details. Thanks.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.