+ Reply to Thread
Results 1 to 3 of 3

Thread: detecting broswer

  1. #1
    lordsofvine is offline x10Hosting Member lordsofvine is an unknown quantity at this point
    Join Date
    May 2008
    Posts
    41

    Question detecting broswer

    i got a problem in my website, the format does not meet the compatibility of the IE, actually i run my website in the firefox and what should i do or could anyone know how to make a calling statement or like for example, if the browser is firefox then the code is like these and when the browser is IE the code is like these, so does anyone know how or what to do, thanks for anyone who trys to help, thank you...

  2. #2
    mujtaba91's Avatar
    mujtaba91 is offline x10Hosting Member mujtaba91 is an unknown quantity at this point
    Join Date
    Jul 2008
    Location
    Doha
    Posts
    50

    Re: detecting broswer

    Use the following conditional statement:
    Also u can change IE 6 to IE 7 , IE 8 etc...

    <!--[if IE 6]>

    <!--Internal stylesheet or external stylesheet goes here-->

    <link rel="stylesheet" type="text/css" href="iespecific.css" />

    <![endif]-->

  3. #3
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: detecting broswer

    HTML Code:
    <script language="JavaScript" type="text/JavaScript">
     if(navigator.appName == "WebTV")
    {
     alert("You're using the WebTV browser.")
    }
     if(navigator.appName == "Netscape")
    {
     alert("You're using a Netscape browser.")
    }
     if(navigator.appName == "Microsoft Internet Explorer")
    {
     alert("You're using the Internet Explorer browser.")
    }
    </script>
    HTML Code:
    <script type="text/javascript">
    var browser=navigator.appName;
    var b_version=navigator.appVersion;
    var version=parseFloat(b_version);
    
    document.write("Browser name: "+ browser);
    document.write("<br />");
    document.write("Browser version: "+ version);
    </script>
    You can use them, but I recommend the last one => Javascript Browser Sniffer
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers