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 Coder
    Join Date
    Feb 2004
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    'Flickering' effect in IE; fine in firefox!

    Hello there.

    I'm atempting to make div objects appear when someone rolls their mouse over the object. So for instance, I have this code at the top of my HTML file:

    Code:
    function toggleDiv(id,flagit) {
    if (object==0 || wanttobeinv==0)
    {
    if (flagit=="1"){
    if (document.layers) document.layers[''+id+''].visibility = "show"
    else if (document.all) document.all[''+id+''].style.visibility = "visible"
    else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"
    }
    else
    if (flagit=="0"){
    if (document.layers) document.layers[''+id+''].visibility = "hide"
    else if (document.all) document.all[''+id+''].style.visibility = "hidden"
    else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden"
    }
    }
    }
    ( if (object==0 || wanttobeinv==0) is code that uses varibles in a different function; the IE problem still happens without this if statment. )

    Then, for my HTML, I'd have:

    Code:
    <div class="tv">
    <img src="images/objects/TvBrush.png" border="0" usemap="#tvmap">
    </div>
    
    <div class="tv" id="tvid" style="z-index:6; visibility:hidden">
    <img src="images/objects/TvPhoto.png" border="0" usemap="#tvmap">
    </div>
    
    <div class="tv" style="z-index:7">
    <map name="tvmap" onMouseOver="toggleDiv('tvtext',1), toggleDiv('tvid',1)" onMouseOut="toggleDiv('tvtext',0), toggleDiv('tvid',0)" onClick="MM_openBrWindow('http://dissonance.mind-network.net/shared/minipages/tv.htm','','width=300,height=700', 'tv')">
      <area shape="poly" coords="134,168,162,155,163,148,167,147,179,22,12,-5,3,137">
    </map>
    </div>
    Now, this code works perfectly in Firefox; as in the cursor moves over the object, and the top most image becomes visible untill the mouse if moved out. However, in IE, a 'flicking' effect occours, where it quickly swtiches betweeen the two images.

    An example can be found here

    Any help would be greatly apprechiated.

    --- Luke

  • #2
    Regular Coder
    Join Date
    Apr 2005
    Location
    Lisbon, CT
    Posts
    339
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am using IE 6.0 sp2 and Firefox 1.0.6 and I don't see any difference except for fonts of the descriptions at the bottom of the page. Has it been fixed?

    BaldEagle


  •  

    Posting Permissions

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