Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"javascript: window.print()" - object expected

Status
Not open for further replies.

bgroves

MIS
Nov 6, 2001
4
Newbie to javascript. Inheriting a app to maintain. I am having a problem with a menu item that allows the user to print the web page. Here is the code:
<MITEM URL="javascript: window.print()">Print Page</MITEM>

The error is:
A Runtime error has occurred.
Line: 0
Error: Object expected

May I get some suggestions?
Thx,
B

 
It is in a drop down menu system where clicking on the item launches a windows print. I assume the real code would be
<a href="javascript:window.print();">Print</a>
if it were not a menu item. I apologize if I am missing the point.
Thx,
B
 
If that is the real code (and for some reason, you seem unsure that it is), then the error lies somewhere else, as that is fine.

Why you can't just give us the real code, I don't know. Perhaps give us a URL to the page so we can try and debug it further?

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top