473,407 Members | 2,315 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

How to hide loading message (displayed with jquery)

i am using jquery to display a working... div to show the user that the query is doing something.
to show....
Expand|Select|Wrap|Line Numbers
  1.      Sys.Application.add_init(function() {
  2.       $addHandler($get('ctl00_ContentPlaceHolder1_LinkButtonQuickReport'), 'click', function() {
  3.         $('#working').show();
  4.       });
  5.     });
to hide...
Expand|Select|Wrap|Line Numbers
  1.       var prm = Sys.WebForms.PageRequestManager.getInstance();
  2.       prm.add_endRequest(function() {
  3.       $('#working').hide();
  4.     });
this works fine when the data is displayed in the gridview. but the user has the option to automatically start a download if the dataset has more than x rows.
the function zips the results to a file and then uses response.transmitefile to start the download. the problem is that the endrequest is never kicked off because of the download, so i am left with the loading message still displayed on the screen. a refresh takes care of it but then all the options set on the page go back to default plus that is just annoying :-).
how do i remove the working div when the user gets an automatic download?
is there a better way to display a working msg than this? i was using updateprogress with updatepanel around the gridview but the response.transmitefile doesnt work.
any help is greatly appreciated
Aug 31 '09 #1
3 4007
Frinavale
9,735 Expert Mod 8TB
The reason your not hitting the end request is because you're not sending back HTML to the browser...so Ajax can't do it's thing to update the portion of the page that needs to be updated.

What I recommend is preparing the zip file when you make the Ajax request and upon returning (in the end request) set a hidden iFrame's source to another ASPX page that will use the Response.TransmitFile() to send the file to the browser. (This means that you'll have to create another ASPX page that will simply return the prepared zip file.)

-Frinny
Sep 1 '09 #2
works great thanks a bunch.
jeff
Sep 2 '09 #3
Frinavale
9,735 Expert Mod 8TB
Awesome :) Glad it worked for you :)

-Frinny
Sep 2 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Matt | last post by:
Does anyone know how to hide the ASPX extension of web pages in ASP.Net 2.0? Thanks, Matt
1
by: Heinz K | last post by:
Hi all, using asp.net 2.0 I have some fields which should only be displayed under some circumstances, otherwise I hide them. This works fine. But the data is displayed in a table with 5 rows,...
2
by: Curious | last post by:
There's a problem with what is displayed on a tab in my UI. At first, it's a message, "loading...". Then it should be replaced with the actual file name on the tab. Now the issue is that it...
1
by: Faraz.ya | last post by:
Hi, When I include an image in a div and add a sliding hide effect on the div to close it, my image in the div don't disappear in internet explorer. I think it's the best if you take a look at:...
7
by: somnamblst | last post by:
I am using jQuery & hideAllExcept.js from this demo tute http://enure.net/dev/hide-all-except-one/ The issue is that on a page with other content, the images I have placed in the toggleThis...
1
by: somnamblst | last post by:
This function swaps images between a close & replay GIF. Line 12 has a speed of 1 second specified for the slideDown, but no speed specified for the slideUp so it is defaulting to normal. I tried...
53
by: souporpower | last post by:
Hello All I am trying to activate a link using Jquery. Here is my code; <html> <head> <script type="text/javascript" src="../../resources/js/ jquery-1.2.6.js"</script> <script...
6
by: aaronkmar | last post by:
Trying to get a loading image to spin while the query is loading. I can get the data div to fade in, but I can't seem to figure out how to get the gif while the query is loading. I'm using two...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.