I'm having an issue with making rollovers show up without the need for me (and all WinXP Service Pack 2 users) to have to click "allow ActiveX on this page" and then let it reload...just in order to see my rollovers.

Its staying on the first evolution of the rollover (the unlit version) and the second evolution just doesnt happen, because I think it has a problem with...

<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('menu_1','','menu_2_2.jpg',1)">

now, I DID search on the boards to find if anyone had any rollover problems, and I see someone recommend a slightly different code than what I'm using... perhaps if I used THIS code IE may not have a problem with it?

<a href="link" onMouseOver="document.image.src='on.gif'" onMouseOut="document.image.src='off.gif'">
  <img src="off.gif" name="image">
</a>

let me try...

In the mean time, someone post a remedy to this (and ill edit the post with the results of the code switch)

Cheers!
Julian


[edit]: well, to no avail.... I tried the different code, but it had the same thing--it was like a generic image, no rollover effect (unless I activated ActiveX) ...sweet

Dani AI

Generated

Brief summary and practical steps.

’s symptom — rollovers stuck on the first image and the browser’s “ActiveX blocked” InfoBar appearing — usually means something on the page is being classified by IE as “active content,” not that basic image swapping itself inherently needs ActiveX. As suggested, moving away from scripted inline swaps to CSS or unobtrusive JavaScript is the safest route; and ’s examples point out that larger sites use Flash/complex widgets (which historically could trigger SP2 behavior), but the immediate goal is to isolate the offending element and remove any ActiveX-dependent technique.

Minimal isolation checklist (apply in order)

  • Create a very small test page with a single image and simple, unobtrusive JS to swap src; confirm whether the InfoBar still appears. Example:

    <!-- test-rollover.html -->
    <img id="r" src="off.jpg" alt="nav">
    <script>
    function addEvt(el, ev, fn){
      if (el.addEventListener) el.addEventListener(ev, fn, false);
      else if (el.attachEvent) el.attachEvent('on' + ev, fn);
      else el['on' + ev] = fn;
    }
    var i = document.getElementById('r'), on = 'on.jpg', off = i.src;
    addEvt(i, 'mouseover', function(){ i.src = on; });
    addEvt(i, 'mouseout',  function(){ i.src = off; });
    </script>
  • If the test page works, reintroduce scripts/CSS from the real page one piece at a time to find the trigger.

  • Search the project for IE-only filters, .htc behaviors, AlphaImageLoader or embedded OBJECT/EMBED tags; those are the likely items SP2 flags as “active content.”

  • Test over HTTP (not file://) and note the exact InfoBar wording — that helps identify whether it’s ActiveX, scripting, or local-file restrictions.

Long-term fixes

  • Use CSS sprites for hover states (no scripting required), for example:

    a.nav { display:inline-block; width:75px; height:15px; background:url('nav-sprite.png') 0 0 no-repeat; }
    a.nav:hover { background-position: 0 -15px; }
  • Prefer unobtrusive event registration and avoid IE-only filters/behaviors that rely on COM/ActiveX.

Caution: do not instruct end users to permanently lower browser security; instead remove or replace ActiveX-dependent techniques so the UI works without changing client settings.

Recommended Answers

All 5 Replies

could you use css instead? there are some examples here:

That just isn't as cool though. The only reason I use CSS is for the text and so I don't have to make those irritating tables. I am trying to figure this out too though. If you go to web sites like http://www.adultswim.com or http://www.rockstargames.com they have the load of stuff that should be blocked but I can't figure out how they are doing it yet. I think I'll search the internet and if I can't find anything I might sift through their code.

well do it in flash then...

Yep I just found out there was a hotfix for Flash so it wouldn't be blocked. All is good again.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.