Solved

Gif Downloading while Process are in execution

Posted on 2009-03-31
3
224 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Using Quotation Marks in PHP This question (http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28217211.html) seems to come up a lot for developers who are new to PHP.  And it got me thinking, "How can we explain the rule…
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
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.

707 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now