January 7th, 2013, 03:12 PM
"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.
January 7th, 2013, 05:41 PM
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.