jwk811 Posted June 11, 2010 Share Posted June 11, 2010 whats the most simplest way to do this. i would need to add the message to the database, and then just select all the messages and add to the current chat div. please help how would this work? Link to comment https://forums.phpfreaks.com/topic/204446-simplest-ajaxphp-chat/ Share on other sites More sharing options...
trq Posted June 11, 2010 Share Posted June 11, 2010 You just described for yourself how it might work. Link to comment https://forums.phpfreaks.com/topic/204446-simplest-ajaxphp-chat/#findComment-1070601 Share on other sites More sharing options...
jwk811 Posted June 11, 2010 Author Share Posted June 11, 2010 yeah but i dunno how i could make it instantly show using javascript with php Link to comment https://forums.phpfreaks.com/topic/204446-simplest-ajaxphp-chat/#findComment-1070604 Share on other sites More sharing options...
JasonLewis Posted June 11, 2010 Share Posted June 11, 2010 JavaScript runs client side, so it wouldn't be that hard to instantly show it. You'd need a timeout that runs every so often to check for updates in the database, so it can get the latest messages. Then when the updates are received, just update the chat DIV. If you have good knowledge of PHP and JavaScript this shouldn't be too tricky. Link to comment https://forums.phpfreaks.com/topic/204446-simplest-ajaxphp-chat/#findComment-1070608 Share on other sites More sharing options...
jwk811 Posted June 11, 2010 Author Share Posted June 11, 2010 im gonna have to study javascript more than. i really dont understand how i can do that Link to comment https://forums.phpfreaks.com/topic/204446-simplest-ajaxphp-chat/#findComment-1070610 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.