HTML: Image Rollovers causing ACTIVEX PopUp Windows

jojogalan

Junior Member
Dec 31, 2007
3
0
0
Hello,
I am a student taking an HTML class and we are using Dreamweaver CS3. I am a complete newbie.

We are making a webpage. Everytime I add an Image Rollover it causes this annoying ActiveX popup window to show up on Internet Explorer when I visit the page. I would like my webpage to be able to be accessed freely, so is there anyway to make the ActiveX window NOT show up everytime people access the page?

Please advise.
Thank you in advance.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Yeah, you will at least need to define the terms "image rollover" and "active x popup" in more detail. If you're adding a control to the page through the <object> tag then it is going to get handled by the IE protection mechanisms that deal with executable controls embedded in HTML. Only way around that issue is with signed code and trust, and unless you have a small and amenable user group forget it.
 

jojogalan

Junior Member
Dec 31, 2007
3
0
0
Hello,

The code causes an active-x control popup in Internet Explorer. Is there any way to avoid the popup?

Thank you. The code is in the next message.

 

jojogalan

Junior Member
Dec 31, 2007
3
0
0
Here is the code:

<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<body *****="MM_preloadImages('sitepics/menu_contact2.gif')"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','sitepics/menu_contact2.gif',1)"><img src="sitepics/menu_contact1.gif" name="Image1" width="78" height="27" border="0"></a>
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
If you're running the HTML file locally on IE 6 SP2 or higher, you're experiencing local machine lockdown. You will not see this warning when running the file via a web server such as IIS or Apache.
 

911paramedic

Diamond Member
Jan 7, 2002
9,448
1
76
I'm going with you have an active x control on the page, a-la your javascript button.

The same thing can be done with css, much less code, and accessible to a wider audience. (Myself, unless I know the site javascript is turned off, so I wouldn't even see your buttons.)