Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Mouse flicker with Equal Columns Height script

  1. #1
    Join Date
    Dec 2006
    Posts
    27
    Thanks
    1
    Thanked 1 Time in 1 Post

    Question Mouse flicker with Equal Columns Height script

    1) Script Title: CSS Equal Columns Height script (v1.01)

    2) Script URL (on DD): http://www.dynamicdrive.com/style/bl...height-script/

    3) Describe problem: I'm using this script and all is well until IE6 enters (isn't that true of anytime you deal with IE though)?

    The mouse flickers in between it's normal pointer and the "busy" pointer (pointer with the hourglass beside it). I've determined that it is caused by the last line of the code:
    Code:
    ddequalcolumns.timer=setTimeout("ddequalcolumns.resetHeights()", 200)}, "resize")
    I changed 200 to 2000 and the flickering slowed to every 2 seconds. So if I only want the script to check for a resize when the page loads, do I even need this line of the script? I know I can change the number to 100 billion, but I wanted to understand why that line of code is necessary. I'm working with a 2-column fixed width layout so browser resizing checks aren't necessary.

    If I remove the last 2 lines of the script, everything works to my liking, but I'd like someone to verify that what I'm doing won't botch something that I'm not even thinking of!
    Last edited by bradymc; 02-22-2008 at 03:36 PM.

  2. #2
    Join Date
    Dec 2006
    Posts
    27
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default

    I've discovered why I would need those last 2 lines of code. I was planning on using the accordion menu script from DD which, obviously, expands and contracts making it necessary to resize the other column.

    So I guess I'm back to my original problem... mouse flicker in IE 6. Anyone got any advice?

  3. #3
    Join Date
    Mar 2007
    Location
    Tarboro, NC
    Posts
    290
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default

    Does the mouse flicker cause a problem or is it just annoying?

  4. #4
    Join Date
    Dec 2006
    Posts
    27
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default

    The script still functions as it should. But it does cause the mouse to flicker between a normal pointer, a hand (if you move over a link), and the busy pointer... depending on where the mouse sits on the page. So since everything works, you COULD say it's just an annoyance. I know I wouldn't stay on a site where the mouse was doing that 5 times per second though.

  5. #5
    Join Date
    Mar 2007
    Location
    Tarboro, NC
    Posts
    290
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default

    I understand, have you tried just adding in

    Code:
    <style>
    BODY {
    cursor: default;
    }
    </style>
    I don't think it will affect the busy cursor, but IEs full of surprises.

  6. #6
    Join Date
    Dec 2006
    Posts
    27
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default

    I haven't tried that... but I just did and got nothing to change.

  7. #7
    Join Date
    Dec 2006
    Posts
    27
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default

    Something that I just thought of...
    If I remove those 2 lines of code at the bottom of equalcolumns.js, could I get into the accordion script and tell it to resize the columns whenever a menu is expanded or collapsed? I have persistence turned off so that shouldn't be affected. Are there any other pitfalls to attempting that?

  8. #8
    Join Date
    Mar 2007
    Location
    Tarboro, NC
    Posts
    290
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default

    Alright, it was worth a shot. You could use something like:

    Code:
    <!--[if IE]>
    <style>
    #ID_OF_THE_MENU {
    display: hidden; /*hide from IE*/
    }
    
    #ID_OF_ALT_MENU {
    display: block; /*show to IE*/
    }
    </style>
    <![endif]-->
    Have 2 menus, alt is hidden by default but if IE is rendering the page hide the default one and show the alt menu.

    EDIT: I can't think of anything, the worst you break it and have to re download it.

  9. #9
    Join Date
    Dec 2006
    Posts
    27
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default

    I'm not sure that I understand what purpose that code is serving. Is that supposed to help the flicker, force the column resize, or both?

  10. #10
    Join Date
    Mar 2007
    Location
    Tarboro, NC
    Posts
    290
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Default

    Here is an example:

    Code:
    <html>
    <head>
    <style>
    div#altmenu {
    display: none;
    }
    </style>
    <!--[if IE]>
    <style>
    div#mainmenu {
    display: hidden; /*hide from IE*/
    }
    
    div#altmenu {
    display: block; /*show to IE*/
    }
    </style>
    <![endif]-->
    </head>
    <body>
    <div id="mainmenu">
    This is menu that FF, Opera, Safari, NetScape will all see.
    </div>
    <div id="altmenu">
    This is the menu IE will see.
    </div>
    </body>
    </html>
    That code should make it so IE sees "This is the menu IE will see." and anything else will see "This is menu that FF, Opera, Safari, NetScape will all see." so in each DIV you can have a different menu, in one place a menu that works well with IE. Maybe just textlinks even. In the other place the Accordion Menu/whatever you want to use.
    Last edited by TimFA; 02-23-2008 at 05:49 PM. Reason: Corrected code error

Bookmarks

Posting Permissions

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