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

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -