JavaScript :hover fix fails when Flash is added to page.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pstrand2000
    New Member
    • Sep 2006
    • 1

    JavaScript :hover fix fails when Flash is added to page.

    My page uses a horizontal navigation bar that requires a JavaScript file to force IE to do hovers. It worked great in both Fire Fox and IE until some Flash code was added.

    This is how the Flash was added:

    First JavaScript was used to "onload" some files in the body tag. That caused the mouseover fix to fail. I solved that by moving the JavaSript call to the bottom of the page.

    Then I added some Flash code and the IE hover fix failed again.

    This is as far as I can get.

    Any ideas why Flash would abort the JS hover fix?

    Flash was added as follows: (script code omitted)

    [HTML]<body bgcolor="#7D765 3" text="#000000" topmargin="0" onLoad="MM_prel oadImages('imag es/bottommenu/b_bookstore_f2. gif', 'images/bottommenu/b_photogallery_ f2.gif', 'images/bottommenu/b_visitus_f2.gi f', 'images/bottommenu/b_search_f2.gif ')">

    <table width="790" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr>
    <td valign="top"><o bject classid="clsid: D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macrom edia.com/pub/shockwave/cabs/flash/swflash.cab#ver sion=5,0,0,0" width="790" height="152">
    <param name=movie value="images/header.swf">
    <param name=quality value=high>
    <embed src="images/header.swf" quality=high pluginspage="ht tp://www.macromedia. com/shockwave/download/index.cgi?P1_Pr od_Version=Shoc kwaveFlash" type="applicati on/x-shockwave-flash" width="790" height="152">
    </embed>
    </object></td>
    </tr>
    </table>

    [/HTML]
    Thanks, Paul
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    If the hover fix code is loaded onload, the body onload will be 'overwriting' it. Use a multiple onload script to run more than one function onload, or just add it to body onload.

    Comment

    Working...