Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rollover images not displaying with https

Status
Not open for further replies.

Gmon

IS-IT--Management
Mar 18, 2001
14
0
0
US
My rollover images display in http but not https. I tried using explict https urls, but it still doesn't work. I am using the follow script for the rollover routine. Is there something I need to do to make rollovers work in https?

Thanks for your help.


<script language="JavaScript" type="text/JavaScript">
<!--
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_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_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>
 
Do you get JavaScript errors when you mouseover when you're using https? Check the lower-left-hand corner of your browswer for a yellow exclamation point.

Also, post the code where you call these functions so we can see the format of the arguments you're using.

--Dave
 
Thanks for the response. Actually, I did more debugging and replaced the jpg image with a gif image within https and it works. In summary my jpg images are not displaying with https. I am using Apache for a WS.
 
that is insanely odd.
glad you got it working.

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
I am thinking it may have something to do with the Apache web server. When I use a JSP include tag to import a document that has jpgs, the jpgs download ok with https. If I use an standard html doc with no include tag and the usual IMG SRC tags, the jpg doesn't download with https.

Very strange, indeed. Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top