473,394 Members | 1,810 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,394 software developers and data experts.

On Interactive messaging during an ajax call

Hi,

I was wondering how I can achieve to display a 'Please wait loading...'
message only if the ajax call is taking more than a second.

The message should only appear if the Ajax call is taking more time
than a second. In my example I set my ajax timeout for 10 seconds and
at my server I sleep for 5 seconds.

So in my example

I get the onloading state and then the server sleeps for 5 seconds and
then finally I get the interactive and on success. So How can I get a
handle in onInteractive that the call is still taking time.

AjaxRequest.get (
{
'url': someURL,
'timeout': 10000,
'parameters': someParams,
'onLoading': 'record current time',
'onInteractive': 'check time if its more than a second',
'onSuccess': 'some success message',
'onTimeout': 'some timeout message',
'onError': 'some error message'
}
);

Thank you
Chaprasi

Jun 2 '06 #1
1 2319
Chaprasi wrote:
Hi,

I was wondering how I can achieve to display a 'Please wait loading...'
message only if the ajax call is taking more than a second.

The message should only appear if the Ajax call is taking more time
than a second. In my example I set my ajax timeout for 10 seconds and
at my server I sleep for 5 seconds.

So in my example

I get the onloading state and then the server sleeps for 5 seconds and
then finally I get the interactive and on success. So How can I get a
handle in onInteractive that the call is still taking time.

AjaxRequest.get (


What's an 'AjaxRequest'?

--
Ian Collins.
Jun 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: siggy2 | last post by:
Hi All, (sorry for my bad english) I wrote a __tiny__ and __stupid__ recursive script directly into pythonwin interactive window with a time.sleep(1) and a print before each recursion... I...
0
by: Dennis Owens | last post by:
Read below for previous conversation. We are developing an application that will some day run on anything from a computer down to a PDA (this is were the Lightweight comes in). The messaging...
6
by: libsfan01 | last post by:
Hi all Can javascript be used to create a simple instant messaging interface on a webpage? if so does anyone good tutorials or resources that are available (preferably free)?
4
by: John Grant | last post by:
If I build a web services today with VS 2005 does it support reliable messaging? If I use WSE 3.0 will it support reliable messaging? If I don’t have reliable messaging can I make a web method...
3
by: Marcus | last post by:
Hy! I use Visio 2002 to draw an ER-Diagram with round about 200 entities and 800 relationships between these entities. Little bit of horror, but I am on my way. My question is, is there a...
7
by: gjrw68 | last post by:
Can javascript be used to create interactive features like guestbooks? Cheers, TF ----------------------------------------------------- http://www.twobigones.com
3
by: radix | last post by:
Hello, I have a aspx page with ajax scriptmanger update panel etc. I also have public string variables on the aspx page. Whenever postback happens from Ajax update panel, at server side all...
4
by: jrsjrs | last post by:
I have been trying to find the software that would enable me to not only type in my chatting from the keyboard, but also allow me to draw in technical sketches with my mouse or a stylus at the same...
2
by: Romeo85 | last post by:
I have started learning about Ajax and SOAP Messaging, can someone tell me what are pros and cons of AJAX compared to SOAP messaging
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.