Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cannot execute a css script through IE9,works fine with Mozilla

    I need to get the below mentioned code working in IE9,it works absolutely fine with Firefox.
    I have included the DOCTYPE,meta for ie9,set the browser mode to IE9 Compatibility view and Document mode to IE9,but it still doesn't work.

    Any help would be appreciated.

    CSS code:clmenu.css

    .mC {width:100px; margin:5px; float:right;}
    .mH {color:#60c; cursorointer; font-weight:bold; border-top:1px solid #300;}
    .mL {display:none; margin-bottom:10px;}
    .mO {margin-left:10px; display:block;}

    Javascript: clmenu.js

    function toggleMenu(objID) {
    if (!document.getElementById) return;
    var ob = document.getElementById(objID).style;
    ob.display = (ob.display == 'block')?'none': 'block';
    }


    HTML: clmenu.html

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 1.0 Strict//EN"
    "http://www.w3.org/TR/html1/DTD/html1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    <html>
    <head>
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <meta http-equiv="content-language" content="en-us" />
    <script src="clmenu.js" type="text/javascript"></script>
    <link href="clmenu.css" type="text/css" rel="stylesheet" />
    </head>
    <body>
    <div class="mC">
    <div class="mH"
    onclick="toggleMenu('menu1')">+ Collapsible</div>
    <div id="menu1" class="mL">
    <a class="mO" href="blclmenu1.htm">Head Script</a>
    <a class="mO" href="blclmenu2.htm">Stylesheet</a>
    <a class="mO" href="blclmenu3.htm">Add Menus</a>
    </div>
    <div class="mH"
    onclick="toggleMenu('menu2')">+ Dropdown</div>
    <div id="menu2" class="mL">
    <a class="mO" href="blmenu.htm">Introduction</a>
    <a class="mO" href="blmenu1.htm">Head Script</a>
    <a class="mO" href="blmenu2.htm">Customize</a>
    <a class="mO" href="blmenu3.htm">Body Script</a>
    </div>
    </div>

    <body>
    </html>

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 1.0 Strict//EN"
     "http://www.w3.org/TR/html1/DTD/html1-strict.dtd">
    There is no such a Doctype. I suspect you wanted to use an XHTML DTD, thus:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    Or you may simply use an HTML5 DTD, which will render properly an XHTML strict code, if it is well formatted.
    Code:
    <!DOCTYPE HTML>
    Last edited by Kor; 09-08-2011 at 12:22 PM.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •