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;
    
    oPopupLoading.show(document.body.clientWidth/2-125,document.body.clientHeight/2-25,250,50,document.body);

Any ideas what am I doing wrong?

Thanks ahead!

Vedmack,

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.

Airshow

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.