Hi, I am writing a page where user submits a request and waits for the
response. Since the process takes quite some time on the server side, I
would like to show a small animation immediately after user submitting
the request. The animation will be terminated once the response is back
from server.
You can find the same trick on maps.yahoo.com. When you go to that
site, it load a small wheels and says "Loading Yahoo Maps...".
Can anyone tell me how to implement this in javascript, ajax maybe?
Thanks,
qq 6 7337
YES,
AJAX CAN HELP YOU SOLVE PROBLEM.
<qu******@yahoo .comwrote in message
news:11******** *************@7 5g2000cwc.googl egroups.com...
Hi, I am writing a page where user submits a request and waits for the
response. Since the process takes quite some time on the server side, I
would like to show a small animation immediately after user submitting
the request. The animation will be terminated once the response is back
from server.
You can find the same trick on maps.yahoo.com. When you go to that
site, it load a small wheels and says "Loading Yahoo Maps...".
Can anyone tell me how to implement this in javascript, ajax maybe?
Thanks,
qq
How?
zhonghua wrote:
YES,
AJAX CAN HELP YOU SOLVE PROBLEM.
<qu******@yahoo .comwrote in message
news:11******** *************@7 5g2000cwc.googl egroups.com...
Hi, I am writing a page where user submits a request and waits for the
response. Since the process takes quite some time on the server side, I
would like to show a small animation immediately after user submitting
the request. The animation will be terminated once the response is back
from server.
You can find the same trick on maps.yahoo.com. When you go to that
site, it load a small wheels and says "Loading Yahoo Maps...".
Can anyone tell me how to implement this in javascript, ajax maybe?
Thanks,
qq
Randy Webb schreef:
zhonghua said the following on 7/7/2006 1:47 PM:
>YES, AJAX CAN HELP YOU SOLVE PROBLEM.
No it won't.
I think some people get fed up with ajax this ajax that... hehe... I can
image though. Ajax isn't a magic potion. Its juist what the acronym
says. All the thinking and planning still have to be done (though there
are some excellent frameworks out there).
There are a couple of options. Ajax is one of them, but I think its more
complecated then needed. I would sugest submitting into a hidden IFRAME.
You can use the TARGET attribute of the FORM tag for that. You can use
the IFRAME's onload handler (iFrameObject.c ontentWindow.on load) to
detect when the submit is completed. The current frame you replace with
a page showing the animation.
<form target="..ifram e.." .. other attributes...>
... fields
<input type="button" value="send" onclick="sendRe quest()"/>
</form>
Scritp:
function sendRequest() {
var theForm = .. get the form
theForm.submit( );
location.href = 'waitpage.html' ;
}
function initIframe() {
var theFrame = ... get the iframe
theFrame.conten tWindow.onload = function() {
this.parent.loc ation.href = 'done.html';
}
}
Now I haven't tested this, but the theory should work. The example might
not, but its meant as a guide / example, not as a complete solution.
Vincent qu******@yahoo. com schreef:
Hi, I am writing a page where user submits a request and waits for the
response. Since the process takes quite some time on the server side, I
would like to show a small animation immediately after user submitting
the request. The animation will be terminated once the response is back
from server.
You can find the same trick on maps.yahoo.com. When you go to that
site, it load a small wheels and says "Loading Yahoo Maps...".
Can anyone tell me how to implement this in javascript, ajax maybe?
Thanks,
qq
Vincent van Beveren said the following on 7/7/2006 3:41 PM:
Randy Webb schreef:
>zhonghua said the following on 7/7/2006 1:47 PM:
>>YES, AJAX CAN HELP YOU SOLVE PROBLEM. No it won't.
I think some people get fed up with ajax this ajax that... hehe...
When AJAX is the solution, no, I don't get fed up with it. When people
babble incoherently about "AJAX is the solution" because they read the
buzz word somewhere and want to sound intelligent, then yes, it gets
commented on.
I can image though. Ajax isn't a magic potion.
It's not even a potion.
Its juist what the acronym says.
There is actually more to it than just what the acronym stands for.
>All the thinking and planning still have to be done (though there are some excellent frameworks out there).
And then it still won't help with a progress bar that disappears when a
process is finished. Showing, updating, and hiding that progress bar has
*nothing* to do with "AJAX".
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: JGH |
last post by:
I want to create a web page that allows a user to run an oracle stored
procedure. That's easy enough but the problem is that the procedure
might take several seconds to complete.
I don't want the user to be able to cancel the process. So,
essentially, I want to call the procedure as a background task and have
the web page that the user sees display something like, "Please wait
while I update the database." And then every 10 seconds or so...
|
by: Bob Murdoch |
last post by:
I'm developing an intranet application using W2k server and IE5.5 - 6.x
clients. I've got one particular function that calls a stored procedure to
update a number of records, depending on user input. The problem we have
run into is that this procedure can take a few minutes to complete in
certain circumstances, and of course IIS times out.
I've been doing some searching for a solution, but most of the answers I've
found relate to...
|
by: metsymani |
last post by:
In my web application, I have a search screen coded in ASP.Net. The Search process takes lot of time. So, I need to show a wait page informing the user that "Search is in progress. Please wait" along with an animated gif. I have placed a div in the search page which contains the message and animated gif. I hide the div by making "display: none" in the onload function of the body tag.
On click of the Search button(type = Submit), I call a...
|
by: Samuel R. Neff |
last post by:
I want to make my app repaint and show a wait cursor during a long
running process but not actually respond to user events. What's the
best way to implement this?
If I just put the process on another thread, the user can continue to
interact with the form. For my own code, I can have a flag in all
event handlers, but what about interaction within a control (i.e.,
expand/collapse tree nodes in treeview). If I change the Enabled...
|
by: Anonieko |
last post by:
Query: How to display progress bar for long running page
Answer:
Yet another solution. REFERENCE:
http://www.eggheadcafe.com/articles/20050108.asp
My only regret is that when click the browser back button, it loads the
progress bar again.
Any solution to this?
| |
by: quickcur |
last post by:
Hi,
I have a html which have a <imgtag. Since it takes quite some time to
download the image when user visit the page, I would like to show a
small animation at the same location of the <imgfirst. When the image
is totally downloaded, I would like to discard the animation and
display the image at the same location. How can I do it?
Thanks,
|
by: lmttag |
last post by:
Hello.
We're developing an ASP.NET 2.0 (C#) application and we're trying to
AJAX-enable it. We're having problem with a page not showing the page while
a long-running process is executing. So, we're looking for a way to display
the page with a "please wait..." message while the process is running, and
then, when the process is done, update the page with the actual results/page
content.
We have a page that opens another browser/page...
|
by: =?Utf-8?B?QWxwaGFwYWdl?= |
last post by:
Hello,
I have a class MyWorker.
Each time I create a new instance of MyWorker, I queue it to the ThreadPool.
So, 1 MyWorker object is pooled and belongs to its thread (there can't have 2
MyWorker in 1 thread from the ThreadPool).
When MyWorker is initialized or instanciate, I use an asynchronous delegate
to execute a long running process (depending on users, the job can be
quicker). So, this async delegate will use or create a new...
|
by: Sin Jeong-hun |
last post by:
Most applications, including Windows Explorer, show some sort of
'wait' dialog with animation when a lengthy operation is going on. For
example, When the Windows Explorer is searching for something, it
shows a small dialog with a moving flashlight. I examined the
explorer.exe and found that that was an avi file.
Now that, I would like to do similar thing in my C# application. But
what is the most efficient way to do so?
1)Manually...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| | |