We accept safe and secure Credit Card and PayPal Payments.
 
Perl Scripts

All Count
Attachment Mailer
Perl Scripts Build A FAQ Plus
Perl Scripts Clock In Center
eBackup Automated
Easy Poll
eSurvey
Fetch a File
Form Maker
Mailing List Server
MySQL Mate
PDF Creation
QCart
Quick Fix
Quote of the day
Speed Search
Task Manager
Traffic Pack
Upload Plus
Upload Gold
Upload Pro
Website Manager

 
Free Perl Downloads

Free Perl Scripts Main Page
Free Perl Scripts 404 Alerter
AccessLog Viewer
Build A FAQ
PHP Scripts eBackup
Free PHP Scripts ErrorLog Viewer
eVars - Server Info
HT Pass Creator
Upload Lite
Website Manager

 
JavaScripts

Free Java Scripts Alert Boxes
Free JavaScripts Browser Sniffer
Check email
Generators
Slide Show
Sudoku
Window Maker
More...

 
Extra Utilities

ASP Scripts Ascii Codes
Free ASP Scripts Color Picker
Font Finder
HT Pass Creator
Meta Cloak
Meta Magic
Pano Zooms
SlideShow
Server Size

 
Online Tutorials

Free HTML Scripts Glossary
Free HTML Scripts HTML
JavaScript
MySQL
SSI
Build Traffic
Other

 
Miscellaneous

About Us
Graphics
Testimonials
Installations
Latest versions

 
Hawk Eye in Tennis

Should Hawk Eye replace linesmen and lineswomen at all tennis tournaments?







 
View all Polls

Run Polls on your site

Run your own Surveys

 
Store Download FAQs Contact Us Support Programming Policies  
JavaScripts :: Detectors :: StyleSheet Loader

Most CSS syntax is understood by most browsers. However, when coding for Netscape 4, you must use CSS syntax strictly as specified in the Standards Specifications. Of course, some browsers (such as Internet Explorer) have extended the attributes, classes and pseudo classes available to you, the coder. There are many tricks that can be used while coding to ensure one stylesheet can be used for all browsers. Sometimes, we just just don't have the time to apply or learn of those tricks. The script allows you to take the easy way out.

This javascript will read which browser is calling the external style sheet, and point the browser to css file specified. If want to use one CSS external stylesheet for IE and one for NS, this script can detect the browser and link to the correct CSS file. If you need to detect other browsers, please see our Browser Sniffer javascript. Copy and paste the code between the <head> and </head> tags.

The Script

<script>
<!--
/* Copyright http://www.perlscriptsjavascripts.com 
   Free and commercial Perl and JavaScripts     */

isNN = document.layers ? 1 : 0; 

if(isNN) { 
    document.write("<link rel=stylesheet href=\"NNstyles.css\">")
} else  { 
    document.write("<link rel=stylesheet href=\"IEstyles.css\">")
} 
// -->
</script>

Note

When nesting quotes (quotes inside quotes), you must escape the inner quotes. As is done with this script. Make sure you also add the correct path to your external style sheets. You may choose to add an absolute path. Eg.

document.write("<link rel=stylesheet href=\"http://www.yourserver.com/IEstyles.css\">")

Select All   De-select
Speed Search our site
Linux Hosting Plans from $9.12 per month, includes Plesk Control Panel, MySQL databases, cgi-bin, crontab manager and 50 email accounts.

Survey Software
Create unlimited web based surveys on your website from your website

Discounted Scripts
Subscribe to our periodial newsletter to receive special offers.

Bathroom Hygiene
How often do you thoroughly clean your bathroom?








View all Polls

Run Polls just like this one on your website!


About us | Contact us | Script FAQs | Script Support | Website Hosting | Our Policies | Store | Testimonials
Subscribers log in here. Subscribe to our periodical newsletter for special offers on commercial scripts, hosting, exciting business opportunities, and industry news and events. Our Mailing List Software is powered by Consolidator    
HTML Plain text
©1999 - 2015 All content Copyright PerlScriptsJavaScripts.com Proudly hosted by LinuxHostingPlans.com