Javascript printing problems

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Mar 2007
Posts: 22
Reputation: enggars is an unknown quantity at this point 
Solved Threads: 0
enggars enggars is offline Offline
Newbie Poster

Javascript printing problems

 
0
  #1
Apr 3rd, 2007
Hello.
I have an ASP page that require printing.
The page is about showing some data from database.
I use the simple javascript printing :

javascript:window.print()

The page design use some css templates.
Well it does print. But it only prints the images and the texts.
The print out seems dont load the css.
Can anybody have the solution so i can print the page exactly as it is shown on the browser.

Many thanks for the help.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 232
Reputation: Rhyan is an unknown quantity at this point 
Solved Threads: 24
Rhyan's Avatar
Rhyan Rhyan is offline Offline
Posting Whiz in Training

Re: Javascript printing problems

 
0
  #2
Apr 4th, 2007
Originally Posted by enggars View Post
Hello.
I have an ASP page that require printing.
The page is about showing some data from database.
I use the simple javascript printing :

javascript:window.print()

The page design use some css templates.
Well it does print. But it only prints the images and the texts.
The print out seems dont load the css.
Can anybody have the solution so i can print the page exactly as it is shown on the browser.

Many thanks for the help.
Hi , check how did you attached the style sheet.
e.g.
<link rel="stylesheet" type="text/css" href="mystyle.css" />

you should add media="all" definition in order styles not to be ignored.

Good luck
" Of all the things I've lost,
I miss my mind the most...."
Mark Twain
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 22
Reputation: enggars is an unknown quantity at this point 
Solved Threads: 0
enggars enggars is offline Offline
Newbie Poster

Re: Javascript printing problems

 
0
  #3
Apr 4th, 2007
Originally Posted by Rhyan View Post
Hi , check how did you attached the style sheet.
e.g.
<link rel="stylesheet" type="text/css" href="mystyle.css" />

you should add media="all" definition in order styles not to be ignored.

Good luck
Hi..
Well well... my problem solved through a single word.
i did change the media="screen" into media="all", and it works.
The page printing is exactly the same as it shown.

Thanks Rhyan....
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC