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? Quote 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. Quote 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 Quote 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. Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/204446-simplest-ajaxphp-chat/#findComment-1070610 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.