Page 1 of 1

ajax and remote refresh

Posted: Thu Nov 01, 2007 8:50 am
by boss01
I got ajax script what updates some info in mysql db using mysql.php for that. There are some if statement's too. And when one of them is true i'd like to refresh the index.php(that's where the ajax request come's). I have try'd

Code: Select all

header("location:index.php") ;
But it make's my div act like a iframe or something and original page will not refresh. Soo how to code something like that?

Posted: Thu Nov 01, 2007 8:55 am
by AVATAr
You are on the client side... return a javascript to do that.

Posted: Thu Nov 01, 2007 9:14 am
by boss01
Got any ideas? Please. :roll: Or just return a js var and check in index is it true and if it's true the page will just refresh.

Posted: Thu Nov 01, 2007 5:28 pm
by WaldoMonster
With javascript you can ridirect with window.location like this:

Code: Select all

window.location = 'http://www.google.com/';