SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard
    Join Date
    Nov 2000
    Location
    Chico, Ca
    Posts
    1,125
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript Style not persisting in IE7

    http://preview.chucksoft.com/teledirect/home.html

    It works in Safari and Firefox. Anyone have any idea's what I am doing wrong?

    Thanks,

    Chuck
    "Happiness doesn't find you, you find happiness" -- Unknown
    www.chuckknows.com

  2. #2
    SitePoint Member
    Join Date
    May 2006
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Chuckie View Post
    http://preview.chucksoft.com/teledirect/home.html

    It works in Safari and Firefox. Anyone have any idea's what I am doing wrong?

    Thanks,

    Chuck
    Hi Chuck,

    I think I'm missing the issue as I can't see it. Can you describe the problem a little further?

    Rey

  3. #3
    SitePoint Wizard
    Join Date
    Nov 2000
    Location
    Chico, Ca
    Posts
    1,125
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Doh! Totally made sense to me, forgot about the other people. So the issue is in the middle of the page there are What, who, when... etc.

    In Firefox, when you hover these the background color changes. So the last one you hovered over is always the darker blue. The background color persists on the last one you hovered over.

    In IE this is not the case. Once the mouse is moved off, the area returns back to the lighter blue. I want it to stay the darker blue. One of the items will always be selected.

    Any clue why this is happening in IE7?

    Thanks,

    Chuck
    "Happiness doesn't find you, you find happiness" -- Unknown
    www.chuckknows.com

  4. #4
    SitePoint Wizard
    Join Date
    Nov 2000
    Location
    Chico, Ca
    Posts
    1,125
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Chuckie View Post
    Doh! Totally made sense to me, forgot about the other people. So the issue is in the middle of the page there are What, who, when... etc.

    In Firefox, when you hover these the background color changes. So the last one you hovered over is always the darker blue. The background color persists on the last one you hovered over.

    In IE this is not the case. Once the mouse is moved off, the area returns back to the lighter blue. I want it to stay the darker blue. One of the items will always be selected.

    Any clue why this is happening in IE7?

    Thanks,

    Chuck
    Can anyone throw some love my way on this issue?
    "Happiness doesn't find you, you find happiness" -- Unknown
    www.chuckknows.com

  5. #5
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IE doesn't like these lines:
    linkElements[i].removeAttribute('style');
    element.setAttribute('style', 'background-color:#345f8a;');

    I replaced them with:
    linkElements[i].style.backgroundColor = "";
    element.style.backgroundColor = "#345f8a";

    and it worked


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
  •