Status Update

In the past when i wanted to check a status from a database, i would create an ajax / javascript request every 30 seconds or 5 seconds to keep checking the database.

Is there a better way to do this now? Or would i still just create a loop structure to keep checking the database?

function ShowEmail(str)

var str='1'

if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  if (xmlhttp.readyState==4 && xmlhttp.status==200)



Basically what i’m doing is checking a status on an application

| John Doe | Application Name | Not Completed | March 29, 2014

If its updated in the database

change status to
| John Doe | Application Name | Completed | March 29, 2014

Its just for eye candy UI … i’m sure i can just tell the person to keep refreshing their page lol; my concern of having the javascript keep looping every 5 seconds through 30 sets of records will create memory issue on the User Computer and Server side.

Sounds like a job for WebSockets:

haha that’s awesome; That’s interesting i’ll have to look into it…

At first glance, its only good for newest versions ofChrome and Firefox . any agent accessing my system would need to be up to date on browsers technology or they’re **** out of luck. aka (refresh screen)

You could use this:

Sorry for the short reply. I’m on my iPad.