codetoad.com
Home||ASP|ASP.Net|C++/C#|DHTML|HTML|Java|Javascript|Perl|VB|XML||CodeToadPlus!||Forums||RAM
Search Site:
Search Forums:
DHTML Menu Flashes with StyleSheets applied in IE twister36 at 05:18 on Friday, February 04, 2005

Evening,

I've built some pulldown menu using DHTML that hide tables via the visibility command. Each time someone goes over then menu the entire menu options are displayed. While the mouse is over the menu the button changes it's background image and applies style sheets such as borders, background colors.

Now everything works great except when the mouse moves though the options on the menu the menu flashes... almost like it loses the style sheets and then re-applies it, even the background image for the button goes away for a quick second.. Now this only happen in Internet Explorer.

Do you gues have any idea on why this occurs in IE?

Here is my code... only the section for the menu:
##################################HTML################################
<td id="HomeMenuMain" class="cn4" onMouseOver="displayMenu('HomeMenu',1);" onMouseOut="hideMenu('HomeMenu',1);" style="cursor:pointer;" background="/forum/Images/MainLayout/Menu_Extenders.jpg" onClick="document.location.href='/forum/index_p_home.html';">
<!--- Home --->
<table border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td valign="middle" class="cn4">  Home <img src="/forum/Images/MainLayout/DownArrow2.gif" alt=""> </td>
</tr>
<tr>
<td>
<span id="HomeMenu" style="visibility: hidden; position: absolute;" style="FILTER: progid:DXImageTransform.Microsoft.Shadow(direction=135,color=#929087,strength=3);">
<table width="150" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td><img src="/forum/Images/MainLayout/Spacer.gif" width="1" height="7" alt=""></td>
</tr>
<tr>
<td background="/forum/Images/MainLayout/DynamicMenu_BackGround.gif" class="cn4" id="NavTd4">
<div id="Nav4">
<a href="/forum/index_p_home.html" style="text-decoration: none" class="cn8"><p><img src="/forum/Images/MainLayout/Spacer.gif" width="20" height="1" alt="" border="0">Corporate Home Page</p></a>
<div class="line"></div>
<a href="/forum/index_p_custhome.html" style="text-decoration: none" class="cn8"><p><img src="/forum/Images/MainLayout/Spacer.gif" width="20" height="1" alt="" border="0">Customer Portal Page</p></a>
</div>
<br>
</td>
</tr>
</table>
</span>
</td>
</tr>
</table>
<!--- Home --->
</td>
##################################HTML################################
##################################JAVASCRIPT################################
function displayMenu(object,activemenu) {
if (activemenu == 1) {
document.getElementById(object).style.visibility='visible';
}
document.getElementById(object+'Main').style.backgroundImage = 'url(/forum/Images/MainLayout/DynamicMenu_BackGround_Over2.gif)'
}
function hideMenu(object,activemenu) {
if (activemenu == 1) {
document.getElementById(object).style.visibility='hidden';
}
document.getElementById(object+'Main').style.backgroundImage = 'url(/forum/Images/MainLayout/Menu_Extenders.jpg)'
}
##################################JAVASCRIPT################################
##################################STYLESHEET################################
#NavTd4{background-color:#FEFDFD;background-image: url("/forum/Images/MainLayout/DynamicMenu_BackGround.gif");border:1px solid #929087;}
#Nav4 .line{border-top:solid 1px #999999;margin:0px 2px 0px 2px;}
#Nav4 p{cursor:hand;margin:0px 2px 0px 2px;padding:2px 4px 4px 8px;border:1px 1px 1px 1px;width:190;}
#Nav4 h5{margin:0px 0px 0px 5px;font-size:95%;width:99%;height:16;border-bottom:1px solid #ADC5ED;}
#Nav4 a{color:#000000;border:1px;}
#Nav4 a:visited{color:#000000;}
#Nav4 a:hover{color:#E6001B;border:1px solid #cccccc;background-color:#f1f1f1;text-decoration:none;}
##################################STYLESHEET################################

Any help would be appericatated!!
Thanks,
Dave

Re: DHTML Menu Flashes with StyleSheets applied in IE tgreer at 14:53 on Friday, February 04, 2005

It would be much easier to troubleshoot a live page. Could you post a link?


Re: DHTML Menu Flashes with StyleSheets applied in IE twister36 at 15:08 on Friday, February 04, 2005

Sure... let me move some code to another server and create a url.. I'll post it today.

Thanks!
Dave

Re: DHTML Menu Flashes with StyleSheets applied in IE twister36 at 17:43 on Friday, February 04, 2005

OK... you can view dummy version at http://redhawk.studio5.com/menu.asp

Notice that when you move throw the menus the background image of the buttons flashes, as well as the background for the pull down menu too.

Thanks for your help!
Dave

Re: DHTML Menu Flashes with StyleSheets applied in IE tgreer at 22:50 on Friday, February 04, 2005

I don't notice any flashing, it seems to work smoothly in both browsers (IE and FF).


Re: DHTML Menu Flashes with StyleSheets applied in IE twister36 at 15:46 on Monday, February 07, 2005

Ya it's odd, but if you use the latest version of IE and move over the menu slowly you don't get the problem... try scrolling through the pulldowns quickly. You should notice it flashing? Do you? Or anyone else?

Thanks - Dave








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
matrix addition
Re: Storing data from HTML to Excel or TXT
Re: function within loop problem
Re: Ô‡´ò¥¯¥é¥Ö¤Ï ¥Æ©`¥é©`¥á¥¤¥É£ò£±£±¥¢¥¤¥¢¥ó ¤Î£··¬ ¤Ç¤¹
Re: Replace
Re: タイトリスト AP2アイアン 712�情�
Re: SMS from Perl using HTTP request
Re: Charl Schwartzel
Re: Adhyayan - Annual Student Conference and Online Coding Festival


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


Copyright codetoad.com 2001-2013