There is a problem i cant solve regarding Internet Explorer 5.5. It is regarding the Print Dialog Box.
From a webpage if I open a popup window (window.open()) containing buttons Print and Close.
The functionality is that when i press the "print" button the Print dialog box is opened (window.print();)
and when I click on the close button the popup window is closed (window.close();)
But the problem occurs when
1. The Print button is clicked - print Dialog box is opened.
2. Click Cancel on the Print Dialog button.
3. Click the Close button
The Close button when clicked now does not close the popup window.
This happens only in IE 5.5 whereas it works in IE 5.0, IE 6.0 and all other browser.
Can you please help me in this?
Thx
DB
Expand|Select|Wrap|Line Numbers
- function printWindow()
- {
- bV = parseInt(navigator.appVersion)
- if (bV >= 4)
- window.print();
- }
- function setPrintedPage(altdoc)
- {
- var prt;
- var prt = document.getElementsByTagName("link")[0];
- prt.setAttribute("href", altdoc);
- printWindow();
- }
- <asp:Button id="btnPrint" runat="server" CssClass="ButtonStyle" Text="Print"></asp:Button>
- <INPUT class="ButtonStyle" id="btnBack" onclick="self.close();" type="button" value="Close"
- runat="server">
- btnPrint.Attributes.Add("onclick", "setPrintedPage(url)");