473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

print() works in IE7 but not IE6

Hi

I am rendering the following Javascript to a print button control in my application:

Expand|Select|Wrap|Line Numbers
  1. <script language=javascript>
  2. var WinPrint = window.open('','','letf=0,top=0,width=1000,height=1000,resizable=yes,toolbar=0,scrollbars=0,status=0');
  3. WinPrint.document.write("This is a test");
  4. WinPrint.document.close();
  5. WinPrint.focus();
  6. WinPrint.print(); 
  7. WinPrint.close();
  8. </script>
  9.  

In IE7 a new window opens and a print dialog box appears for me to set the printer and send the page off.

However in IE6 all I get is the data in the window - no print dialog.

There is obviously a compatibility issue here but I cannot find anything on the web.

Can someone help me please?

Thanks in advance.
Oct 1 '07 #1
7 2970
acoder
16,027 Expert Mod 8TB
Try removing the line that closes the window and test that. It may be a timing issue.
Oct 1 '07 #2
Thanks.

Tried that but it just displays the page - no print dialog.
Oct 1 '07 #3
acoder
16,027 Expert Mod 8TB
Are you testing on a full version of IE6 or a standalone version?
Oct 1 '07 #4
Are you testing on a full version of IE6 or a standalone version?
It's a standalone version downloaded via MutlipleIE installer from Tredo.

I've found that it works OK on a full version of IE6 installed on the test web server that the application is deployed to - 6.0.3790.3959 with SP2.

However my clients are using full IE6 versions and the print is not working.
Oct 2 '07 #5
acoder
16,027 Expert Mod 8TB
I've found that it works OK on a full version of IE6 installed on the test web server that the application is deployed to - 6.0.3790.3959 with SP2.

However my clients are using full IE6 versions and the print is not working.
Well, if you've got it working on a full version, you may need to change a setting on the client's browsers, or they could just upgrade to IE7.
Oct 2 '07 #6
you may need to change a setting on the client's browsers
Any idea what that may be?
Oct 2 '07 #7
acoder
16,027 Expert Mod 8TB
Any idea what that may be?
I'm not sure. I assume a normal window.print() within a page works fine? Is this problem only for popups?
Oct 2 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Mark Goldin | last post by:
I am trying to implement a printing to file solution of a html page on the server. What I have is a form with a IE control that loads the page I want to print to. I am using execWB command for...
1
by: John | last post by:
I am having a problem with window.print in a popup window. I am creating 2 popup windows both with a print button in them, 1 works the other doesn't. Code runs in a javascript function on a...
4
by: Julie Siebel | last post by:
Apologies...I'm sure this has been asked before, but I can't seem to come up with the correct Google search terms. While my problem is with stylesheets, the errors are being caused by my...
16
by: John Baker | last post by:
HI; I feel like a fool..I put CUTE FTP in my last request for help --it should have been CUTE PDF! I have FTP on my mind because I have been working on a web based application, and somehow my...
0
by: Tessa | last post by:
Is there any security reason why you cannot print to a network printer from ASP.NET under IIS6 on Windows 2003 server? I'm using ASP.NET code to print to a server print queue using...
3
by: Umut Tezduyar | last post by:
In the msdn.microsoft.com/library most of the articles have an "print" option. But the "print" button is different from the javascripts "window.print()" method. It postpacks the page and then...
0
by: Paco Ferre | last post by:
Hello, I founded some examples of WebControl printing in internet and tryed to have them working for a DataGrid, something not very complicated. I have a page, Page1.aspx with a DataGrid...
22
by: stephen | last post by:
I have created an order form that users javascript to create a new html document when the customers clicks the "print page" button. Once the new document has been created it then prints the...
2
by: =?Utf-8?B?RGlmZmlkZW50?= | last post by:
Hello All, I am trying to offer "Print" functionality using an HTML button with the help of "window.print()" This button works fine in Firefox but not in IE7. I am dumping the entire content...
4
by: MisterPete | last post by:
I created an object that inherits from file and was a bit surprised to find that print seems to bypass the write method for objects inheriting from file. An optimization I suppose. Does this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.