Visual Basic .NET » ASP.NET General Discussion
Timeout -- Gil --


I'm trying to change default value for timeout but it doesn't seem to work because my onAjaxTimeout method is always called after 10 seconds.

Here's a part of my client side code:

function Export() {
Ajax.timeoutPeriod = 60*1000;
Ajax.Export(selChkLst, Export_callback, null, null, onAjaxError,
onAjaxTimeout, null);
}
function ExportOperation_callback(res) {
// some code
}
function onAjaxTimeout() {
alert("A timeout occured.");
}
function onAjaxError() {
alert("An error occured.");
}

I tried with different values for timeoutPeriod ranging from 15 seconds unp to 1 hour and onAjaxTimeout was always called after 10 seconds. I also tried to set timeoutperiod in initialization part of my code, but it didn't fix anything.

Anyone have an idea ?
Thanks !

-- Michael Schwarz --


Hi,

currently you can only set the timeoutPeriod as a global variable for all requests:

AjaxPro.timeoutPeriod = 60 *1000;

This value cannot specified for a wrapper class or method.

Regards,
Michael
On 7/6/06, Gil wrote:

I'm trying to change default value for timeout but it doesn't seem to
work because my onAjaxTimeout method is always called after 10 seconds.

Here's a part of my client side code:

function Export() {
Ajax.timeoutPeriod = 60*1000;
Ajax.Export(selChkLst, Export_callback, null, null, onAjaxError,
onAjaxTimeout, null);
}
function ExportOperation_callback(res) {
// some code
}
function onAjaxTimeout() {
alert("A timeout occured.");
}
function onAjaxError() {
alert("An error occured.");
}

I tried with different values for timeoutPeriod ranging from 15 seconds
unp to 1 hour and onAjaxTimeout was always called after 10 seconds. I
also tried to set timeoutperiod in initialization part of my code, but
it didn't fix anything.

Anyone have an idea ?
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:info
-- KAliUlug --


Hello,

I couldn't use Ajax.Export method. What I want to do is simply call one method upon all ajax timeouts.

-- KAliUlug --


Hello,

I have figured it out;

To the end of the page (any place after the inclusion of core.ashx)
place the script;

AjaxPro.timeoutPeriod = 10 * 1000;
AjaxPro.onTimeout = handleTimeout;

function handleTimeout()
{
alert("A timeout occured");
}

[Submit Comment]Home