CSS Menus display behind listboxes in IE - workaround

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
estring
Forum Members
Forum Members
Posts: 22
Joined: Tue Sep 06, 2005 2:55 am

CSS Menus display behind listboxes in IE - workaround

Post by estring »

While testing out CMSMS, I noticed an issue that is extremely common in applications when viewed using Internet Explorer where dynamic drop-down menus display behind list boxes.  I've made a small change and tested it out in Internet Explorer, Netscape, and Firefox to correct the problem.

The following additions will hide all listboxes on a page while a user is hovering the mouse over any menu item in the adminstration area.  The listboxes will display again when the mouse has moved off of the menu. Since the JavaScript events are triggered by onMouseOver and onMouseOut in the , this should alleviate the problem for CSS, DHTML, or JavaScript menus as long as they are contained within a tag.

Here's the code:

In admin\themes\default\defaultTheme.php, add the following two Javascript event handlers to the topmenucontainer div:

REPLACE:


WITH:



In admin\themes\default\includes\standard.js, add the following Javascript function:


function showhideSelect(Show)
{
    var selects = document.all.tags('select');
    var result = '';
    if(Show)
    {
        for (var i=0; i<selects.length; i++)
        {
            if(selects.wasVisible==true)
                result += selects.style.visibility = "visible";
        }
    } else {
        for (var i=0; i<selects.length; i++)
        {
            if(selects.style.visibility!="hidden")
            {
                selects.wasVisible=true;
                result += selects.style.visibility = "hidden";
            } else {
                selects.wasVisible=false;
            }
        }
    }
}



By the way, I have reviewed a ton of CMS products and CMSMS is by far my favorite.
sawz

Re: CSS Menus display behind listboxes in IE - workaround

Post by sawz »

i want to be sure on this.

this is so ie will show my dynamic menu,,i.e.  the menu drops down to show pages that are parented to the top link? just want to be sure before i mess up my web site.
By the way, I have reviewed a ton of CMS products and CMSMS is by far my favorite.
me too and i agree, this one rocks!! :)
sawz

Re: CSS Menus display behind listboxes in IE - workaround

Post by sawz »

tried it, didnt work. my stuff works in firefox and opera, i havent tried it in netscape so i dont know.

won't work in ie 6 or 7 not sure which
estring
Forum Members
Forum Members
Posts: 22
Joined: Tue Sep 06, 2005 2:55 am

Re: CSS Menus display behind listboxes in IE - workaround

Post by estring »

Sawz

I just implemented the change again using the instructions in the post and it works fine for me on the following browsers:
Internet Explorer 6.0.2
Mozilla Firefox 1.5.0.1
Opera 8.54
Netscape 8.1

I'm currently using the latest stable CMSMS release 0.12.1 "Savusavu".  I'll attach the two files with my modifications so you can compare them with yours. Both have been renamed with ".txt" extensions for uploading.

standard.js - JavaScript starts at line 93.
defaultTheme.php - Line 89


Hope this helps.
-estring

[attachment deleted by admin]
sawz

Re: CSS Menus display behind listboxes in IE - workaround

Post by sawz »

thanks, i'l be trying it soon.
i haven't changed my originals except to try the fix.

i aso have the latest cms release like you.
can i just overwrite it?

i appreciate your help
estring
Forum Members
Forum Members
Posts: 22
Joined: Tue Sep 06, 2005 2:55 am

Re: CSS Menus display behind listboxes in IE - workaround

Post by estring »

Overwriting the files shouldn't cause a problem, but I'm I always recommend making a backup copy.  If you have a backup, you can restore the files to their original state if you run into problems.
sawz

Re: CSS Menus display behind listboxes in IE - workaround

Post by sawz »

ok i tried, no luck, however,

my admin works fine in ie so i'll figure it out maybe.

thanx for your time
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: CSS Menus display behind listboxes in IE - workaround

Post by Dr.CSS »

sawz
are you having a problem with your website with drop down menus?

  mark
sawz

Re: CSS Menus display behind listboxes in IE - workaround

Post by sawz »

yes, there not showing in internet explorer, however they work in my admin section.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: CSS Menus display behind listboxes in IE - workaround

Post by Dr.CSS »

Got Link? mine!

  mark
sawz

Re: CSS Menus display behind listboxes in IE - workaround

Post by sawz »

yeah, I do

Jay

thanks for checking :)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: CSS Menus display behind listboxes in IE - workaround

Post by Dr.CSS »

found this in the head,,





in this i found,,

var menuh = "menuh"; // Classname for hovering over all other menu items

if (window.attachEvent) window.attachEvent("onload", cssHover);

function cssHover() {

that line is a call to load the javascript on widow "onload" meaning the rendering of your page on a web browser, but just above the if/endif you have this

if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller



which is another call on window "onload"
2 .js on the same page can create conflicts, 1 if they have within them a call for the exact same "action", besides the widow "onload" call, either the one listed first will get the 'call' or neither will or they will both fail all or part of the way, no way to tell just what will happen. to fix this you need to read this,,
Adding more than one JavaScript to a page
that's from www.dynamicdrive.com a great place for javascripts, i have a page that uses 7 external JS and 4 on page JS, includes 3 menu scripts, 1 so you can drag the page around, 1 for back/forward and diff. buttons. enuf rambling,, you might try and load that script from an external file like,,

you 'path' may vary  ;) then you can play with the order of them, some times it works.
btw what is all that script for?

    mark
sawz

Re: CSS Menus display behind listboxes in IE - workaround

Post by sawz »

everything there was placed by cms, i didnt add anything.
strange, but i installed cms into a subdomain and it works fine in ie

i may have to re install it...oh boy

edited to ask: can i delete my current installation and re instal without my db getting wiped out?
Last edited by sawz on Sat Apr 08, 2006 2:19 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: CSS Menus display behind listboxes in IE - workaround

Post by Dr.CSS »

I wouldn't start over yet, we can work with this, what is in your template where this is,,



string(83) "Smarty error: unable to read resource: "globalcontent:JavaScript for IE page width""
string(83) "Smarty error: unable to read resource: "globalcontent:JavaScript for IE page width""

are you having a problem with the page width?



(this needs to be "/modules/CSSMenu/CSSMenu.js")

if you take out what ever that is then we can work on the rest.
what menu are you using?
you might want to put the title end at the end if want this to show up in the webbrowser header,,
CMS Made Simple Demo - Home
Web Hosting, quality web host, host, shared hosting, cPanel, MySql, Php, PhpMyAdmin, Horde, Fantastico, 99% guaranteed uptime, 30 day money back guarantee, Try before you buy, FrontPage extensions, full cgi-bin, High end servers, the list goes on....did we mention Quality Web Hosting cheap? otherwise it just shows up at the top of the page.

    mark
sawz

Re: CSS Menus display behind listboxes in IE - workaround

Post by sawz »

thanx man but its too late. 
i'll let you know what happened...grrrr
Post Reply

Return to “Modules/Add-Ons”