Edited by dEcade, 26 July 2008 - 07:52 PM.
Ajax Update automatically
Started by dEcade, Jul 26 2008 01:04 PM
2 replies to this topic
#1
Posted 26 July 2008 - 01:04 PM
Hi guys, I saw an Ajax script a long time ago that if there was something new inserted into the database it would update the page without the user having to refresh. Does anyone know where I could find something like this?
#3
Posted 26 July 2008 - 04:53 PM
Ok I'm working on a chat script and I've got it to work but right now what I've been using is this:
but I don't want it to keep refreshing so I thought that there could be an ajax thing so that when something new is added to database it will automatically update the chat window without refreshing. I would also make it so that it submits without it refreshing.

To update a div with JavaScript, you typically change the innerHTML attribute.
I know how to do it that way. I just don't know how to make it know something new is added.
Also I really don't need anything fancy I just need something that will do the job quick and efficient.
I hope I clarified myself a little more about what I'm looking for.
<script type="text/javascript">
setTimeout("window.location.replace('WHAT EVER')", 2000);
</script>
but I don't want it to keep refreshing so I thought that there could be an ajax thing so that when something new is added to database it will automatically update the chat window without refreshing. I would also make it so that it submits without it refreshing.
rc69, on Dec 21 2007, 11:20 PM, said:
To update a div with JavaScript, you typically change the innerHTML attribute.
I know how to do it that way. I just don't know how to make it know something new is added.
Also I really don't need anything fancy I just need something that will do the job quick and efficient.
I hope I clarified myself a little more about what I'm looking for.
Edited by dEcade, 26 July 2008 - 05:14 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
