JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 5th, 2001, 11:17 AM
quiquedcode's Avatar
quiquedcode quiquedcode is offline
webber
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2000
Location: San Juan - Argentina
Posts: 594 quiquedcode User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 10 h 25 m 20 sec
Reputation Power: 13
Send a message via ICQ to quiquedcode Send a message via MSN to quiquedcode Send a message via Yahoo to quiquedcode
Unhappy Print a document using JavaScript

How can i add to my site a button and when user presses that button, the site prints itself...?

Thanks in advance.
__________________
Enrique Becerra
CodeIgniter, Joomla & Java Development
www.itexa.com.ar

Reply With Quote
  #2  
Old November 5th, 2001, 11:23 AM
liljim's Avatar
liljim liljim is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2001
Location: England
Posts: 967 liljim User rank is Lance Corporal (50 - 100 Reputation Level)liljim User rank is Lance Corporal (50 - 100 Reputation Level)liljim User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 20 h 32 m 5 sec
Reputation Power: 12
<a href="javascript:window.print();">Print</a>.... as far as I know, you can only print one page at a time rather than the whole site, without doing some server side stuff.

Reply With Quote
  #3  
Old November 5th, 2001, 11:25 AM
cxi's Avatar
cxi cxi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Location: Stuttgart
Posts: 21 cxi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
so zum beispiel

<a href="#" onClick="window.print();return false">druck mich </a>

Reply With Quote
  #4  
Old November 5th, 2001, 08:05 PM
quiquedcode's Avatar
quiquedcode quiquedcode is offline
webber
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2000
Location: San Juan - Argentina
Posts: 594 quiquedcode User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 10 h 25 m 20 sec
Reputation Power: 13
Send a message via ICQ to quiquedcode Send a message via MSN to quiquedcode Send a message via Yahoo to quiquedcode
Angry Didn't work & dunno why

I get an error when i press the button (or link) or image(with link)
I've tried with all and get this error:
(tried with window.print()) as i was told...

...
"The object don't accept this property or method"
...
Do you want to keep executing JavaScript on this page?
YES NO

Does anyonw have a working example?
I'm newbie at JAvaScript... as you may have noticed...

Thanks...

Maybe i have to replace window by _self or by _parent ?

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Print a document using JavaScript

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap