javascript - JS/Ajax - Change page with PHP in ajax -
ive got ajax type script changing div content data php file using xmlhttp:
function updatelog() { request = 'messages.php?new='+first+'&time='+lastupdate+'&user='+user; xmlhttp.open("get", request ,false); xmlhttp.send(); document.getelementbyid("messages").innerhtml=document.getelementbyid("messages").innerhtml+xmlhttp.responsetext; lastupdate = time(); first = 0; document.getelementbyid("messages-window").scrolltop = document.getelementbyid("messages-window").scrollheight; }
i want redirect user using header( 'location: kick.php' );
redirects xml request, not whole page. how can redirect whole page , not request?
use javascript redirect
window.location = "kick.php"
Comments
Post a Comment