467,212 Members | 1,087 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,212 developers. It's quick & easy.

Diplaying Animated Gif

I'm building an upload page and I'm using javascipt to show/hide an
animated gif when they click the upload button but when it is displayed
the animation stops during the upload process? Is this because of the
cpu load or any ideas on what could be causing this? I'm using PHP to
upload the file. Here is my code to show/hide the gif.

function UploadImage( f ){
if(f.userfile.value.length < 1)
{
f.bUpload.disabled = false;
f.bCancel.disabled = false;
f.bUpload.value = 'Upload';
alert("Please select a file to upload!");
f.userfile.focus();
return false;
}
else {
f.bUpload.disabled = true;
f.bCancel.disabled = true;
f.bUpload.value = 'Uploading....Please Wait';
return true;
}
}

Feb 6 '06 #1
  • viewed: 1401
Share:
1 Reply
Sorry forgot this instead

function showPopup(){
if( !document.getElementById ) return;
document.getElementById('popup').style.display = 'block';
}

function hidePopup(){
if( !document.getElementById ) return;
document.getElementById('popup').style.display = 'none';
}
<DIV id="popup" style="BORDER-RIGHT: #000 1px solid; PADDING-RIGHT:
10px; BORDER-TOP: #000 1px solid; PADDING-LEFT: 10px; BACKGROUND: #fff;
PADDING-BOTTOM: 10px; BORDER-LEFT: #000 1px solid; WIDTH: 200px;
PADDING-TOP: 10px; BORDER-BOTTOM: #000 1px solid; HEIGHT: 50px;
TEXT-ALIGN: center">Loading. Please Wait...<BR>
<IMG src="images/Loading.gif" border=0></DIV>

Feb 6 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by John J. Hughes II | last post: by
2 posts views Thread by Koen Hoorelbeke | last post: by
7 posts views Thread by Gary Kaucher | last post: by
4 posts views Thread by Jeff | last post: by
7 posts views Thread by Lemune | last post: by
27 posts views Thread by Phil | last post: by
reply views Thread by helraizer1 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.