Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Gif Downloading while Process are in execution

Posted on 2009-03-31
3
235 Views
Last Modified: 2013-11-11
Hi:

I need to show a gif with the leyend "Please Wait: Downloading"; this when the user push a buttom a file is processes. I have the next JavaScript to show and hide a <div></div> where the gif is (the Image Control is used here).

To show the <div> works fine but when the process is over I need to hide again the <div>

What I can do? I have the next line in the Finally part, but doesn't works:
Finally
'Response.Write("javascript: cerrar();")
End Try

Solutions please


All this is in ASP.NET with framework 1.0... yes I know is old version but that was that the client paid.



////////////////////////////////In the Html
 
<script language="JavaScript">
				function mostrardiv() 
				{
					div = document.getElementById('crazy');
					div.style.display = '';
				}
				function cerrar() 
				{
					div = document.getElementById('crazy');
					div.style.display='none';
				}		
		</script>
 
 
///////////////////////////// I show the <DIV> where the downloading.gif is//////////////////
<form id="Form1" method="post" runat="server" onsubmit="return mostrardiv();">

Open in new window

0
Comment
Question by:777999
  • 2
3 Comments
 
LVL 63

Accepted Solution

by:
Zvonko earned 250 total points
ID: 24033332
I do not see why you would need to call that cerrar() function because after submit is the page reloaded anyway with the state defined in the html page.

But anyway, you can use the fact that no user interface is updated while havy processing is done like form submit and file upload.
So you could call that cerrar() function immediately and it will be seen after upload finish.
Like this:

                        function mostrardiv()
                        {
                              div = document.getElementById('crazy');
                              div.style.display = '';
                                                                                setTimeout(cerrar, 1700);
                        }
0
 

Author Comment

by:777999
ID: 24041060
Zvonko:

Thank you so much. You have reason I am using a FileUpload, that's the reason why I need the hide the gif. You have your points :)

There are another way to calculate the time of upload and show the gif in the proportional Time?
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 24041337
You closed this Question before I have seen it.
Do you need more support? Why did you grade with the grade B?
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If I have to fix slow responding website my first thoughts are server side optimizations: the database may not be optimized or caching is not enabled, or things like that. We often overlook another major part of our web application: the client. We o…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question