Solved

ajax animation / update panel / web service call

Posted on 2009-07-08
4
699 Views
Last Modified: 2012-05-07
Hello,

2 part question here.

I would like to have one of those animations where background is greyed out and just little circle turning animation (or whatever it is) that seems fairly common with ajax websites.
The ajax toolkit has a sample but the animations used (fading, collapsong, changing color , etc) are not what i am looking for.  
I was hoping to be able to copy and paste some code and maybe even the animated gif if that is what is used.
I'm not good with the ajax animations stuff and I'm a little short on time to learn it all.

1) Can anyone show me how to accomplish what I am looking for, or provide good link to a clear example where i can leverage working code?  

But  I'm not sure the toolkit sample (UpdatePanelAnimation extender) will work for me.
I have 2 update panels on my page and I wanted the whole page to be disabled when the ajax request is processing, not just the update panel that caused the postback.
Also to further complicate things, the button that send the (potentially) long running request is calling a web service from the client side so its not running all the normal page events like a normal button click on an update panel would do.

Basically i a complex page with grid & details in seperate update panels.
User fills in part of details and needs to click a button that will go execute a stored procedure, return and update a calculated field.
So once they hit this "calculate" button i wanted whole page to disable and prossesing animation shows up data is retrieved from db.

Hope i am explaining this clearly.

2) Can anyone give me a sample of how to do this or a link to a clear example where i can leverage working code?

I'm using Asp.Net 2.0 & Ajax toolkit 1.0
Thanks!

0
Comment
Question by:krazykoder
  • 3
4 Comments
 
LVL 8

Accepted Solution

by:
MrAgile earned 500 total points
ID: 24809275
Hi there,

Forget about ms ajax. You can use a js framework like (www.jquery.com) to achieve what you are seeking. For the modal dialog you can use:

http://dev.iceburg.net/jquery/jqModal/

for the webserivce call you can use this and when you have a working page post another question and we can help with the *update panel* part of the application.

http://www.west-wind.com/weblog/posts/324917.aspx

Sean
0
 

Author Comment

by:krazykoder
ID: 24814637
Hmm, ok I will look into this.

But I have realized that we have an ajax UpdateProgress control implemented in our master page that is giving me the desired effect (modal overlay with animated loading gif) for the update panel partial postback (but it disables the whole page which is what i wanted anyway).  When i added a loop to delay response it kicks in and all seems fine.  This seems good becase it prevents the need to implement something on every content page that needs it.  So i think I am left with only the web service call part.

Would there be a way to manualy start & stop this ajax UpdateProgress control from javascript on my content page before and after my web service call.

We are already using ajax but not JQuery.
I'd rather just stick with 1 method if possible.

But if thats not going to work I'll do whatever needs to be done.

0
 

Author Comment

by:krazykoder
ID: 24815031
http://www.west-wind.com/weblog/posts/324917.aspx

Isn't WCF .NET 3.5?  I'm using 2.0 and not sure how this applies.
My web service call works, I'm not lookign to change it.
0
 

Author Comment

by:krazykoder
ID: 24818853
I figured out how to accomplish what i wanted by leveraging the existing Ajax UpdateProgress control we had on master page.
It already gets triggered on any async postbacks.
And for my web service call I just use a line of code in my sendRequest and OnComplete javascript functions to reference Ajax UpdateProgress control and toggle it's .style.display between block and none.

MrAgile, that jqModal seems real cool.
I will give you the points because I could have implemented it using your jQuery answer and we will be using WCF in our future projects.  So it is good info and links - thank you!

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 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

24 Experts available now in Live!

Get 1:1 Help Now