Skip to main content
Participant
March 28, 2009
Question

AJAX Solution?

  • March 28, 2009
  • 1 reply
  • 253 views
As it will become very obvious to you, I haven't a clue when it comes to AJAX and reading from a database and displaying the result to the screen without refreshing the page. What I would like is a little guidance, example code to get me started and what I have in mind is the following:

I have a database table setup (images) with image information in it fields named, imageid, imagename, imageactive, and I want to have a page that displays the image using the img src= tag of the image that is marked as "imageactive" in the database. Then using AJAX to continuously check that database table and when a new image it tagged as "imageactive" then I want that image to now be displayed on the screen. Sample code attached.

Does anyone know how to do this? Is it using the CFDIV tag? Component Tag? Sample code would be greatly appreciated.

Thank you in advance!
Tom
This topic has been closed for replies.

1 reply

BKBK
Community Expert
Community Expert
March 29, 2009
In my opninion, what you describe comes close to a use case for -- whatelse -- cfAjaxProxy. The livedocs include a fully worked out example.