[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Gif Downloading while Process are in execution

Posted on 2009-03-31
3
Medium Priority
?
248 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 750 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
Suggested Courses

873 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