Highlighted

Real Time Display Of New Records

Explorer ,
Oct 23, 2014

Copy link to clipboard

Copied

I have developed a CRM that is based on sales leads that post to a database.  The CRM index page performs a select query and displays a filtered recordset based on the SQL.  This index page refreshes every 30 seconds via a Meta Tag refresh.  But I am thinking that there must be a more robust/efficient method.  Ideally I would have a popup appear each time that new record posts that when clicked would bring up the detail for the record.  And if such a robust method exists, what might better the overall refresh of the data other than a Meta refresh?  Any direction you can advise would be appreciated,
.

Most Valuable Participant
Correct answer by Carl_Von_Stetten | Most Valuable Participant

Some of that can easily be done with JavaScript and a function that makes AJAX calls to ColdFusion to check for new records, on a timer (30 seconds).  You could use WebSockets which offers Real-Time display, but depending on the rate of data change, that could be overkill.

As an example, look at how this site or Google monitor for new messages using AJAX. If you are logged into these forums, your avatar at the top of the screen may have a white number in an orange circle to the left of the avatar - indicating you have new messages or updates awaiting your attention.  If you have no messages or items, the circle goes away.  As new messages or items arrive in your Inbox, the circle reappears and the number will change.  This is done via AJAX requests that poll the inbox service on a timed interval. In your application, you'll have to decide what the appropriate interval is (or make it a user setting that gives them some options such as 30 seconds, 1 minute, 5 minutes, etc.).

All of this is done without refreshing the entire page (which is what Meta Tag refresh does).

Views

195

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Real Time Display Of New Records

Explorer ,
Oct 23, 2014

Copy link to clipboard

Copied

I have developed a CRM that is based on sales leads that post to a database.  The CRM index page performs a select query and displays a filtered recordset based on the SQL.  This index page refreshes every 30 seconds via a Meta Tag refresh.  But I am thinking that there must be a more robust/efficient method.  Ideally I would have a popup appear each time that new record posts that when clicked would bring up the detail for the record.  And if such a robust method exists, what might better the overall refresh of the data other than a Meta refresh?  Any direction you can advise would be appreciated,
.

Most Valuable Participant
Correct answer by Carl_Von_Stetten | Most Valuable Participant

Some of that can easily be done with JavaScript and a function that makes AJAX calls to ColdFusion to check for new records, on a timer (30 seconds).  You could use WebSockets which offers Real-Time display, but depending on the rate of data change, that could be overkill.

As an example, look at how this site or Google monitor for new messages using AJAX. If you are logged into these forums, your avatar at the top of the screen may have a white number in an orange circle to the left of the avatar - indicating you have new messages or updates awaiting your attention.  If you have no messages or items, the circle goes away.  As new messages or items arrive in your Inbox, the circle reappears and the number will change.  This is done via AJAX requests that poll the inbox service on a timed interval. In your application, you'll have to decide what the appropriate interval is (or make it a user setting that gives them some options such as 30 seconds, 1 minute, 5 minutes, etc.).

All of this is done without refreshing the entire page (which is what Meta Tag refresh does).

Views

196

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 23, 2014 0
Most Valuable Participant ,
Oct 23, 2014

Copy link to clipboard

Copied

Some of that can easily be done with JavaScript and a function that makes AJAX calls to ColdFusion to check for new records, on a timer (30 seconds).  You could use WebSockets which offers Real-Time display, but depending on the rate of data change, that could be overkill.

As an example, look at how this site or Google monitor for new messages using AJAX. If you are logged into these forums, your avatar at the top of the screen may have a white number in an orange circle to the left of the avatar - indicating you have new messages or updates awaiting your attention.  If you have no messages or items, the circle goes away.  As new messages or items arrive in your Inbox, the circle reappears and the number will change.  This is done via AJAX requests that poll the inbox service on a timed interval. In your application, you'll have to decide what the appropriate interval is (or make it a user setting that gives them some options such as 30 seconds, 1 minute, 5 minutes, etc.).

All of this is done without refreshing the entire page (which is what Meta Tag refresh does).

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 23, 2014 1