944,068 Members | Top Members by Rank

Ad:
Apr 3rd, 2007
0

Javascript printing problems

Expand 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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
enggars is offline Offline
22 posts
since Mar 2007
Apr 4th, 2007
0

Re: Javascript printing problems

Click to Expand / Collapse  Quote originally posted by enggars ...
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
Reputation Points: 21
Solved Threads: 26
Posting Whiz in Training
Rhyan is offline Offline
240 posts
since Oct 2006
Apr 4th, 2007
0

Re: Javascript printing problems

Click to Expand / Collapse  Quote originally posted by Rhyan ...
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....
Reputation Points: 10
Solved Threads: 0
Newbie Poster
enggars is offline Offline
22 posts
since Mar 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: jstool
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: using if condition & functions in JS





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC