ajax and remote refresh

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
boss01
Forum Newbie
Posts: 19
Joined: Sun May 27, 2007 3:31 pm

ajax and remote refresh

Post 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?
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

Post by AVATAr »

You are on the client side... return a javascript to do that.
boss01
Forum Newbie
Posts: 19
Joined: Sun May 27, 2007 3:31 pm

Post 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.
User avatar
WaldoMonster
Forum Contributor
Posts: 225
Joined: Mon Apr 19, 2004 6:19 pm
Contact:

Post by WaldoMonster »

With javascript you can ridirect with window.location like this:

Code: Select all

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