Forgot Password / Register
Site Statistics
Total Members: 520
Total Tutorials: 242
Newsest User: 8884244477
Todays Unique Hits: 14
0 Users 4 Guests Online
Forum Index » Javascript » [REQ] Refreshing a DIV with AJ
Posted on Sunday 10th February 2008 at 04:28 PM
Thomas
templates/default/images/noavatar.png's Avatar
Newbie
I have seen things like shoutbox's and stuff that refresh using iframes ect.

But, I would like something like a div reloads so the user doesn't know its reloading in the background, it would be alot better than making an iframe do it, as I think alot of people hate that.

Cheers for any help given about the issue. :)
Posted on Thursday 26th June 2008 at 12:18 PM
ilyas-shezad
templates/default/images/noavatar.png's Avatar
Junior Member
Yup its possible look at my ajax chat tutorial.
I use the javascript function...
Code

setInterval("functiontorun()", 2000);


so it'll run a certain function (u can do a ajax function) every 2 seconds i think the above one does.
The second parameter is basically how often u want the first parameter to run. soooo i have it set to 2 seconds which means functiontorun() will run on the page every 2 seconds.