473,770 Members | 6,713 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2341
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
7337
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 should have taken a closer look at the ending condition (never satisfied!), anyway I was quite confident that a control-C would have stopped the intepreter as it is (incidentally?) when this break sequence is entered
0
1550
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 that we want to send will be very straightforward. If one of the clients has changed some data, the other clients need to know about it. If the clients are not on line then the message may have to wait until they are on line. The messages
6
2450
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
1572
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 call that does not reach the web service? If so, what does the call do? Timeout, hang? thanks
3
3940
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 tool that can create an interactive website (with dhtml, ajax or something like that) from such a diagram? I want to click on an entity and then only want to see the relationships for this entity. Nothing else. Is there such a tool or do you know a...
7
1499
by: gjrw68 | last post by:
Can javascript be used to create interactive features like guestbooks? Cheers, TF ----------------------------------------------------- http://www.twobigones.com
3
7832
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 the public string variables are reset to empty string. As if fresh page is loaded. How to preserve the page level variables during Ajax postback?
4
4603
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 time. The website that best demonstrates this technique is at - deleted Click on the "Take a tour" link to see the demo of this interactive learning feature that they use. The features of the above online tutoring system include: Instant...
2
1879
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
9425
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,...
0
10225
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10053
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10001
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,...
0
8880
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, 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...
0
6676
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();...
0
5312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3573
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.