Reputation: 89
I have a page which is pretty basic. There is a jquery script that runs when a user clicks on a menu item. The jquery runs a ajax to load the content of ANOTHER page inside a div tag. The page that loads checks to make sure the user is logged in still. The problem is i can not redirect the entire page back to the login screen.
META HTML REDIRECT i have tried this. The issue here, not all the browsers redirect - such as FF. And I really don't like this way.
HEADER REDIRECT I have tried to insert a header redirect in the page that loads. The issues here is, the ajax inserts the login page inside the div tag... resulting in a website inside of a website.
Is there any other way of doing this? Thank you.
Upvotes: 2
Views: 880
Reputation: 38645
You could use JavaScript to redirect. Try window.location.replace(your_login_url)
which is similar to a HTTP redirect.
Upvotes: 1