Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Real Time Display Of New Records

Explorer ,
Oct 23, 2014 Oct 23, 2014

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,
.

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

correct answers 1 Correct answer

Guide , Oct 23, 2014 Oct 23, 2014

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

...
Translate
Guide ,
Oct 23, 2014 Oct 23, 2014
LATEST

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).

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