473,386 Members | 2,114 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,386 software developers and data experts.

Window.Print() fails on Mac IE 5.2

I am using the standard print link in my web page for printing:

<a href="#" onClick="javascript:window.print(); return false;">PRINT
PAGE</a>

and it works fine on every browser and platform I've tested on EXCEPT Mac IE
5.2

Does anyone know of a way to get this to work on Mac IE 5.2?

Many thanks!
Jul 23 '05 #1
2 2322
Mark Findlay wrote:
I am using the standard print link in my web page for printing:

<a href="#" onClick="javascript:window.print(); return false;">PRINT
PAGE</a>

and it works fine on every browser and platform I've tested on EXCEPT Mac IE
5.2

Does anyone know of a way to get this to work on Mac IE 5.2?

Many thanks!

function printDoc(){
if(window.print){window.print(); return}
if(navigator.userAgent.toLowerCase().indexOf("mac" )!=-1){
alert("Press Command+P"); return;
}
alert("You may need to press Control+P to print page\nor consult your OS
specifications")
}

<a href="#" onClick="printDoc(); return false;">PRINT
PAGE</a>

Mick
Jul 23 '05 #2
Mark Findlay wrote:
I am using the standard print link in my web page for printing:

<a href="#" onClick="javascript:window.print(); return false;">PRINT
PAGE</a>

and it works fine on every browser and platform I've tested on EXCEPT Mac IE
5.2

Does anyone know of a way to get this to work on Mac IE 5.2?


Remove the "javascript:" nonsense, see the FAQ, and write the
link dynamically, see <news:41**************@PointedEars.de>.
If that does not help, check if the "window" *host* object has
even a print() method (you should use feature testing always),
see <http://pointedears.de/scripts/test/whatami>.

BTW: Note that ECMAScript/J(ava)Script is case-sensitive.
HTH

PointedEars
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Raptor | last post by:
I'm a complete Javascript n00b, using a snippet I found on the web. I'll probably be buying a Javascript book. What's the authoritative on-line resource for Javascript, like php.net is for PHP? ...
2
by: dan | last post by:
This works in mozilla but I can't figure out why this won't work in IE. Say I have this html <html> header goes here header goes here
3
by: Sol Linderstein | last post by:
Hi, I'm writing a CGI application and here's what I'm stuck with. There are some text boxes in an html form that I want to validate. The validation needs to happen on the server side because the...
2
by: Asad | last post by:
I have a main window that creates a new window called printWin (which contains the printable format of the page). From the main window I embed a javascript in the printWin window that calls the...
10
by: Marshall Dudley | last post by:
When I do the following line in Netscape, the popup loads as it should, but the parent window usually, but not always, reloads as well. <a href="#"...
1
by: dibyendu_k | last post by:
Hi, 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...
2
by: Bell, Kevin | last post by:
The following works in the interactive window of PythonWin, but fails in a script. TypeError: Objects of type 'slice' can not be converted to a COM VARIANT I just need to parse out these dates,...
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...
5
by: VisionSet | last post by:
Anyone know why this line fails to print anything? document.write(window.top.myWindowArray.name); For that matter, neither does this: document.write('>>' + window.top.myWindowArray.name); ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.