Possible Duplicate:
Server Side Reload Initiation on Ajax Call
How do I properly reload the index.php file after an AJAX Call?
Possible Duplicate:
Server Side Reload Initiation on Ajax Call
How do I properly reload the index.php file after an AJAX Call?
I'm not sure, if i understand your problem. Why don't you reload page on ajax response status?
Example: json response, with jquery
<script type="text/javascript">
$(document).ready(function() {
$.ajax({
type: "GET",
data: ...,
dataType: "json",
success: function(res) {
if (res.status == 1) {
// do redirect, user is logged in
window.location = 'b2e.htm';
} else {
// login failed
}
},
parsererror: function(res) {
// login failed
},
error: function(doc) {
// login failed
}
});
});
</script>
php script:
<?php
$logged_in = false;
// your login script
if ($logged_in == true) {
echo '{"status": 1}';
} else {
echo '{"status": 0}';
}
?>