Hi,
one big mistake is the use of setInterval because Ajax requests should
run asynchronous and a call can run longer as your timer. Please
change this to setTimeout and call another setTimeout in the callback:
function callback(res) {
// do your work here
// and then call the setTimeout
setTimeout(invoke, 1000);
}
function invoke() {
Namespace.Class.MyMethod(1, 2, 3, 4, callback);
}
This example will call MyMethod nearly every second (1000 msec).
Regards,
Michael
On 7/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I've been working on a project using AJAXPro.2 and .NET 2.0.
>
> Essentially, every time I come to the page for the first time, my call
> to ajax returns 'null' (I get errors when I check it using typeof( ).
> However, when i hit refresh, everything performs nominally.
>
> Another oddity: I've put the AJAX call in a setInterval format, so it
> executes every 5 seconds. However, on the first time to the page, it
> will poll every 5 seconds, and still not return anything that can be
> compared using typeof( ).
>
> Any help is appreciated. I'm using AJAXPro.2.dll v6.7.11.1
>
> Thanks!
>
>
> >
>
--
Best regards | Schöne Grüße
Michael
Microsoft MVP - Most Valuable Professional
Microsoft MCAD - Certified Application Developer
http://weblogs.asp.net/mschwarz/
http://www.schwarz-interactive.de/
mailto:[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ajax.NET Professional" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/ajaxpro
The latest downloads of Ajax.NET Professional can be found at
http://www.ajaxpro.info
-~----------~----~----~----~------~----~------~--~---