Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > On Interactive messaging during an ajax call

Reply
Thread Tools

On Interactive messaging during an ajax call

 
 
Chaprasi
Guest
Posts: n/a
 
      06-02-2006
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

 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      06-03-2006
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
AJAX Treeview How to keep expanded nodes expanded during AJAX postback ton ASP .Net 2 12-10-2008 04:11 PM
Upgrade path for MCSA:2000 Messaging to MCSA:2003 Messaging D. Young MCSA 2 04-05-2005 08:19 AM
Interactive/Non-interactive ASPX ? WJ ASP .Net 2 02-26-2005 02:54 AM
non Interactive and Interactive AAH Computer Support 0 01-09-2005 04:09 PM
Interactive and non interactive AAH Computer Support 1 01-09-2005 04:01 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57