#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2010
    Posts
    195
    Rep Power
    45

    "Real-time" database results refreshed and displayed without page reload


    I've been presented with a challenge by one of our executives, and I wanted to post it here to see if anyone had any thoughts/suggestions for feasibility.

    At a conference, he wants to have two laptops showing a continually vertically scrolling list of "submissions" from the audience. A 3rd computer will handle the data entry from the crowd. The laptop will insert the entries into a MySQL database for storage.

    I'm thinking that maybe we handle the database pull silently by creating an ajax script than fires every 30 seconds or so to pull the new information into the page being displayed.

    If it finds new entries, I'd like it to use jQuery to fly those into the page with some type of shrink effect to make it look like they are being added in realtime (whereas in reality there is a 30 second delay).

    Does any of this seem feasible? Any other ideas on how to achieve this effect?

    I found this demo online, but it will end up showing the audience the key-in process as well, which we don't want. Typing under pressure is never good.

    http://demos.9lessons.info/update_delete.php
  2. #2
  3. A Not To Shabby Code Smurf
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2008
    Posts
    1,136
    Rep Power
    120
    Why don't you just take the example (from the link) and take out the form fields. Then trigger the function window.onload() and either use a jQuery function or a setTime() / setInterval(); to create a real time update. Then create a form in another page; that submits data (using a server side language(s)) to your database. That way; one monitor can view the page with the AJAX function in it and be updated real time. Then another monitor can view the page, with the form in it and the end user can enter data, into said form.

IMN logo majestic logo threadwatch logo seochat tools logo