Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling non http 200 response (302 redirect for login) #125

Closed
halwaxt opened this issue Aug 24, 2011 · 0 comments
Closed

Handling non http 200 response (302 redirect for login) #125

halwaxt opened this issue Aug 24, 2011 · 0 comments

Comments

@halwaxt
Copy link

halwaxt commented Aug 24, 2011

I'm using nyroModal v2 in an ASP.NET MVC3 application. The application forces users to authenticate and the auth cookie has max. lifetime of two hours. When the auth cookie expires all requestes are redirected to a login page (using http status code 302).

When a user opens a link in a modal window and the auth cookie is expired nyroModal shows "an error has occored". I managed to add a callback function to handle all errors

$(this).nyroModal({
callbacks: {
error: function (nm) {
alert("some error, but which one?");
}
});

but I don't see a way to decide what kind of error (http status code) has happened. Is there an error object in nyroModal or do I need to attach an error handler using jQuery?

What I want to achieve is: close the modal window and redirect the browser window to the login page.

Thanks in advance!

Thomas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants