|
|
| View previous topic :: View next topic |
| Message |
|
Author
|
Gil
Newbie
|
Joined: 07 Jul 2006
Posts: 1
|
|
Posted: Fri Jul 07, 2006 4:00 am
Post subject: Timeout |
|
|
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 !
|
| Back to top |
|
 |
|
Author
|
Michael Schwarz
Newbie
|
Joined: 06 Jul 2006
Posts: 30
|
|
Posted: Fri Jul 07, 2006 4:00 am
Post subject: |
|
|
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:
| Quote: |
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
|
| Back to top |
|
 |
|
Author
|
KAliUlug
Newbie
|
Joined: 11 Jul 2006
Posts: 5
|
|
Posted: Wed Jul 26, 2006 4:00 am
Post subject: |
|
|
Hello,
I couldn't use Ajax.Export method. What I want to do is simply call one method upon all ajax timeouts.
|
| Back to top |
|
 |
|
Author
|
KAliUlug
Newbie
|
Joined: 11 Jul 2006
Posts: 5
|
|
Posted: Wed Jul 26, 2006 4:00 am
Post subject: |
|
|
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");
}
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|