PDA

View Full Version : 'Flickering' effect in IE; fine in firefox!



Desinc
08-16-2005, 08:26 PM
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:



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:



<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 (http://dissonance.mind-network.net/So/I/ran/faster/but/it/caught/me/here.php)

Any help would be greatly apprechiated.

--- Luke

BaldEagle
08-17-2005, 12:31 AM
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