Hi I'm creating a popup to display a loading message, inside this popup i placed an animated gif...

the problem is that the gif is not being animated (it is an animated gif...) , its is being shown but without the animation...

This is the code:

oPopupLoading = window.createPopup();
    var oPopupBody = oPopupLoading.document.body;
    oPopupBody.style.cssText = "margin:0px;border:1px outset;background:#97baea;FONT-FAMILY: verdena, Arial, sans-serif;overflow:hidden"
    var hStr = "";
    hStr += '<table width=100% height=50 style="background:"><tr><td align=center><img src="../../myfolder/load.gif" width=16 height=16></td>'
    hStr += '<td valign=middle align=center style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #010d36"><span id=spMesangerCaption>' + str + '</span></td>';
    hStr += '</tr></table>';
    oPopupBody.innerHTML = hStr;

Any ideas what am I doing wrong?

Thanks ahead!

6 Years
Discussion Span
Last Post by Airshow


I'm not sure why the gif should decide not to animate. It works in IE 6. Maybe it's a bug in the version of the browser (presumably IE) that you are using.

As far as I can tell, window.createPopup is proprietary Microsoft. I have certainly never used it or the associated methods.

A better solution (cross-browser or otherwise) would be to use an absolutely positioned div and show/hide it with element.style.display = 'block'; / element.style.display = 'none'; .

With a little further effort in working out height and width, this should work in all the common browser families - IE, Moz and Webkit - if necessary.


Edited by Airshow: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.