Forum



16:04

31/03/2010

Hi there,
I'm trying to get the loadError event to fire so that I can redirect the user to the my login page. When I make the server return a 500 error then I expected the event to be triggered but it doesn't.
I'm setting the loadError function like this:
alert("Ajax Error occurred\n"
+ "\nstatus is: " + xhr.status
+ "\ntextStatus is: " + textStatus
+ "\nerrorThrown is: " + errorThrown
);
},
If I use the following jquery ajax call then I do get the error event and can display the error status.
type: "POST",
url: "http://localhost:8080/webauth/.....",
dataType:"json",
error:function (xhr, ajaxOptions, thrownError) {
alert("Ajax Error occurred\n"
+ "\nstatus is: " + xhr.status
+ "\nthrownError is: " + thrownError
+ "\najaxOptions is: " + ajaxOptions
);
}
});
any idea what I need to do to trigger the loadError event?
Thanks in advance!
19:48

31/03/2010

In the struts plugin that I am using then I found that I had to use
and then I have the function to redirect to the logout page like this:
$.subscribe('error', function(event, data) {
$(location).attr('href',"logoutAction");
})
It is the struts plugin which appears to have been getting in the way of the loadComplete as well as a few of the other events, and attempting to override the defaults doesn't help.
Most Users Ever Online: 715
Currently Online:
68 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66