Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Jan 2010
    Posts
    5
    Member #
    20956
    I want to make a statement in JavaScript that displays one version of HTML code if the browser is IE6 and another version of the HTML code if the browser is any browser but IE6 (including Safari, Firefox, etc.).

    This goes beyond CSS conditional statements what I'm trying to do here so I'm wondering how I can user JavaScript to accomplish this.

    Thank you!

  2.  

  3. #2
    Member
    Join Date
    Jan 2010
    Posts
    40
    Member #
    20832
    HTML Code:
    <!--[if IE 6]>
    <script type="javascript/text" href="script.js"></script>
    <![endif]-->
    And that's all you need to use specific Javascript for ie6. In that javascript file, you give instructions to how to deal if it is ie6. You use the normal stylesheet and javascript and then override the rules in the javascript included if the html conditional comment takes place.

  4. #3
    Senior Member imagn's Avatar
    Join Date
    Jul 2007
    Location
    Los Angeles
    Posts
    156
    Member #
    15594
    You might find this link useful as well:
    http://www.quirksmode.org/css/condcom.html


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:51 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com