Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
detecting loading and applying of print stylsheets
Old 03-11-2007, 12:32 PM detecting loading and applying of print stylsheets
lajkonik86's Avatar
Ultra Talker

Posts: 389
Trades: 0
Is there anyway i can use javascript to detect:
- When a print stylesheet is loaded
- When a print stylesheet is being applied
?

Regards,
Thierry
__________________
Know what to Download

Please login or register to view this content. Registration is FREE
lajkonik86 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-11-2007, 03:48 PM Re: detecting loading and applying of print stylsheets
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
As far as I know, a stylesheet is loaded by the browser,with the datas of the page, depending of the context.
If you have separate stylesheets, the @print will probably not be loaded by your browser. At least, not before you ask for a print preview.

I don't understand why you would detect the loading of a stylesheet anyway.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 03-11-2007, 04:31 PM Re: detecting loading and applying of print stylsheets
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
He means like is there a way so that if someone is using IE it loads a different CSS from FF.

I've saw it done, I'm not sure if it's with PHP or javascript/html mind. If anyone does know it will be useful
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Old 03-11-2007, 05:07 PM Re: detecting loading and applying of print stylsheets
lajkonik86's Avatar
Ultra Talker

Posts: 389
Trades: 0
Quote:
Originally Posted by tripy View Post
As far as I know, a stylesheet is loaded by the browser,with the datas of the page, depending of the context.
If you have separate stylesheets, the @print will probably not be loaded by your browser. At least, not before you ask for a print preview.

I don't understand why you would detect the loading of a stylesheet anyway.
Well i've been looking at the loaded part using the firebug extension for firefox. Turns out that the the separate stylesheets are being downloaded at the same time as the other stylesheets.

Now there's the question of when they are being applied. My guess is that it will only be just before someone uses print-preview or print.

How could i monitor an element to see if its style properties change with javascript?
__________________
Know what to Download

Please login or register to view this content. Registration is FREE
lajkonik86 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to detecting loading and applying of print stylsheets
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.44660 seconds with 12 queries