Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. JavaScript Menu Doesnt work properly in IE 11 or any other browsers

JavaScript Menu Doesnt work properly in IE 11 or any other browsers

Scheduled Pinned Locked Moved JavaScript
javascriptdata-structuresquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    ShaktisinhRathod
    wrote on last edited by
    #1

    //Basically

    var spaces = new Array();
    var p = 0;
    var fast = 75;
    var text;

    function start(t, maxLength) {
    var s = '';
    text = t;
    textL = text.length;
    if (textL >= maxLength) maxLength = 20 + textL;
    numospace = maxLength - textL;
    for (var i = 0; i < numospace; i++) {
    for (var j = 0; j < i; j++) {
    s += ' ';
    }
    spaces[i] = s;
    s = '';
    }
    right();
    }

    function right() {
    status = spaces[p] + text;
    if (p < numospace) p++;
    else if (p == numospace) { p--; left(); return false; }
    setTimeout('right();', fast);
    }

    function left() {
    status = spaces[p] + text;
    if (!p) { p++; right(); return false; }
    p--;
    setTimeout('left();', fast);
    }

    function InitMenu() {

    start("  W e l c o m e  T o  P A C  S y s t e m", 20);
    var bar = menuBar.children
    var refFrame = document.getElementById("menuFrame")
    refFrame.visibility = "hidden";
    refFrame.style.width = 0;
    refFrame.style.height = 0;
    for (var i = 0; i < bar.length; i++) {
        //		    var menu = eval(bar\[i\].menu)
        //newly added as menu was not working
        var menu = document.getElementById(document.all ? bar\[i\].menu : bar\[i\].getAttribute('menu'))
        menu.style.visibility = "hidden"
        bar\[i\].onmouseover = new Function("ShowMenu(" + bar\[i\].id + ")")
        var Items = menu.children
        for (var j = 0; j < Items.length; j++) {
            var menuItem = eval(Items\[j\].id)
    
            if (menuItem.menu != null) {
                menuItem.innerHTML += "<Span Id=" + menuItem.id + "\_Arrow class='Arrow'>4</Span>"
                //var tmp = eval(menuItem.id+"\_Arrow")
                // tmp.style.pixelLeft = menu.getBoundingClientRect().Right //- tmp.offsetWidth - 15
                FindSubMenu(menuItem.menu)
            }
            if (menuItem.cmd != null) {
                menuItem.onclick = new Function("Do(" + menuItem.id + ")")
            }
            menuItem.onmouseover = new Function("highlight(" + Items\[j\].id + ")")
        }
    }
    

    }
    //}
    //}

    function FindSubMenu(subMenu) {
    var menu = eval(subMenu)
    var Items = menu.children
    for (var j = 0; j < Items.length; j++) {
    menu.style.visibility = &qu

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups