Progress Bar refreshing issue in an ajax - ajax

Iam a newbie to MVC and have a problem with updating progress bar.
I have a long running updation code inside my controller and i had to show a progress bar to indicate the status.So I broke down the updation codes into 5 parts and did the same from 5 individual ajax request.In between each ajax request I wrote the code for updating the progress bar.Once I run the application the progress update is not displayed after each request and its only being displayed at the end. If an alert is placed between each request the progress can be seen accordingly.
Is there anything I can do for refreshing the UI

Related

How to implement Progressbar for Android WebView in Ajax Calls

I implemented Progress bar loader for android web view,
But the progress bar not dismissed after the response came in AJAX calls.
Whenever I clicked ajax calls based link in that site,progress bar appearing but not dismissed ,after getting the response also.
How can I overcome this.

AJAX long load hangs even on page refresh

I have a page that loads 2 drop down menu with AJAX. Then it loads a third AJAX that can take over 30 seconds to load. (slow SQL query).
When user selects items from the 2 drop downs the third slow AJAX is fired again to list the results.
All works fine on first load. But if I refresh the page or if user selects a different option while the third ajax is still loading, the page hangs until the third ajax has been loaded.
I have tried to .abort() the load, but that does not seem to help. The browser waits for the aborted file to load before loading ajax 1&2 and 3.
I added the abort to onbeforeunload but that does not help the page refresh problem.
I have tried this using pure JavaScript and jQuery but get same results.
The server is IIS6 and the XML output is from asp pages.
Is there any way to get around this?
Abort Ajax requests using jQuery
This should help you in aborting the ajax call. Just check on which ajax call you are actually calling abort() function.
On the side note, just check whether your browser is getting hung because of other processes running in your system. Because, every ajax request that is fired will start a db query and that may also give you a hung feel.

Browser OnLoad event handler

I have made an google chrome extension recently. It is working fine except that it works only when user clicks it. I want it to update status even if it is not clicked. So, there is any browser onload action so that I can start updating the status continuously using AJAX.
Thanks :)
Create a background page for your extension.
The background page is loaded as soon as the extension is enabled, so any code in your background page will get executed without needing the user to click anything.

Wicket: concurrent Ajax requests limited to one?

Situation
In my Wicket application, I have a page which contains two tags. Each time a tab is selected, its content is fetched via Ajax so that every time you switch to a different tab its content it loaded fresh from the server.
On one of the tabs I have an input field which has an onblur event which saves the contents of the field via Ajax.
Problem
If the focus is on the input field and I click to a blank area of the page, the Ajax request it fired and the data saved.
If, instead of clicking on a blank area of the page, I click on the other tab, the Ajax request to save the input field is fired but not the Ajax request to switch tabs.
Is the number of concurrent Ajax requests limited in Wicket to one?
Yes, concurrent requests to a page instance are limited to one. Wicket Ajax will queue subsequent Ajax requests in the client side channel. See the wicket Ajax debugger for details in your running application.
This is done to make building your application easier: no need to work around concurrency issues on the server. Page access is always one done from one single thread: the current active request thread. If we didn't do this, we would have to synchronize on the component tree and make the whole programming model go yuk.
The problem was our AjaxIndicator which overlays a DIV over the entire page for the duration of each Ajax request. The "mouseup" (and consequently "click") events arrived when the overlay was in place, and thus lost. By holding the mouse button down and releasing it after the first Ajax request had completed and overlaying DIV removed, the second ajax request was fired.
It seems obvious now as the whole reason why we have such an overlay is to prevent users clicking while an Ajax request is running.
I think my solution will be to disable the ajax indicator on certain, very quick requests such as these where it makes no sense to have an indicator (disregarding the potential that requests could take much longer in case of unusually high server load).
May be the response of the onblur ajax request may have error or the process you are performing after the ajax response may have error.
If possible can you paste the code sniplet.

EditLive! Rich Text Editor - submitting form via ajax

The project I'm working on is using the Java EditLive! rich text editor. I've been trying to make the EditLive form post via ajax, but am having some problems using IE8. Here are the steps we're taking:
Load the main page
The user clicks a link and the EditLive applet is loaded and attached to the page via ajax
The user finishing editing their document and clicks the submit button
The form posts via ajax (we're using jQuery.post())
The EditLive section is reloaded and the EditLive content is correct.
The form immediately posts again
The EditLive content is back to being blank.
Unfortunately (for debugging reasons), this is not happening in FireFox - there is only a single form post and the values are saved correctly.
From what I can tell debugging this in IE8, it looks like the submit event is getting called twice with 2 different forms. My thought is that the applet isn't getting destroyed correctly, though I've tried everything in my power to destroy it.
So I was wondering if anyone has any experience successfully submitting EditLive data via ajax? Or maybe this is just a limitation to the product?
Any help would be greatly appreciated!
I know this is an old issue but you likely want to look at the autoSubmit property of EL:
http://docs.ephox.com/display/EditLive7/AutoSubmit+Property
http://docs.ephox.com/display/EditLive/AutoSubmit+Property
I suspect that by using an AJAXy submit process this is somehow causing you issues with EditLive and its standard behavior. I would try turning off autoSubmit and grabbing the content yourself in your jQuery posting process.

Resources