Nexy Posted June 20, 2008 Share Posted June 20, 2008 Why Hello There! I was going to make a shoutbox, and was wondering if I could refresh the <div> the shoutbox will be in every 20 seconds or so. Or instantly whenever a new response is made in it. I will be storing the shouts mysql. I possibly could use header() but have no idea how I would go about doing this. Any help would be appreciated. Thank You! Link to comment https://forums.phpfreaks.com/topic/111065-solved-refresh-a-certain-part-of-the-page/ Share on other sites More sharing options...
bluejay002 Posted June 20, 2008 Share Posted June 20, 2008 ajax or iframe. Link to comment https://forums.phpfreaks.com/topic/111065-solved-refresh-a-certain-part-of-the-page/#findComment-569936 Share on other sites More sharing options...
kranthi117 Posted June 20, 2008 Share Posted June 20, 2008 ajax will be the best solution to your problem call the php script via ajax for every 20 seconds or so.. filll the div with the responseText. Link to comment https://forums.phpfreaks.com/topic/111065-solved-refresh-a-certain-part-of-the-page/#findComment-569937 Share on other sites More sharing options...
Nexy Posted June 20, 2008 Author Share Posted June 20, 2008 Ajax, o.o I guess I'll have to start learning that. Do I have to know any javascript before I start it, because I know none. Link to comment https://forums.phpfreaks.com/topic/111065-solved-refresh-a-certain-part-of-the-page/#findComment-569938 Share on other sites More sharing options...
bluejay002 Posted June 20, 2008 Share Posted June 20, 2008 Ajax is JavaScript. yes you need to be familiar with JavaScript but not needed to be a pro in JavaScript. there are some ready-made classes for Ajax, say prototype.js. you just need to be familiar in order to use it. Link to comment https://forums.phpfreaks.com/topic/111065-solved-refresh-a-certain-part-of-the-page/#findComment-569944 Share on other sites More sharing options...
Nexy Posted June 20, 2008 Author Share Posted June 20, 2008 Thank You! Link to comment https://forums.phpfreaks.com/topic/111065-solved-refresh-a-certain-part-of-the-page/#findComment-570237 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.