Skip to main content
Inspiring
April 21, 2017
Answered

Slider and toggle button that update database in realtime

  • April 21, 2017
  • 1 reply
  • 915 views

I have used CF for many years, but every action always takes place by hitting a submit button and loading the next page. I need to work on a project that involves having a slider and a toggle button that update a database in realtime (without reloading the page). I would also like the ability for elements on the page (like text values) to update in realtime based on what is in the database. Can someone please help me get started on how this sort of thing is done?

    This topic has been closed for replies.
    Correct answer WolfShade

    AJaX.  You can either build the XMR manually, or use something like jQuery or MooTools to set up your AJaX connection.

    (jQuery makes it very easy; but you may not want to load the library just for AJaX abilities.)

    You use a button instead of a submit button and have JavaScript submit the data in the background using AJaX; the return values can be used to update DOM values.

    HTH,

    ^_^

    1 reply

    WolfShade
    WolfShadeCorrect answer
    Legend
    April 21, 2017

    AJaX.  You can either build the XMR manually, or use something like jQuery or MooTools to set up your AJaX connection.

    (jQuery makes it very easy; but you may not want to load the library just for AJaX abilities.)

    You use a button instead of a submit button and have JavaScript submit the data in the background using AJaX; the return values can be used to update DOM values.

    HTH,

    ^_^

    Inspiring
    April 21, 2017

    Thanks so much. Can anyone recommend a good JQuery forum that I can post any questions in as I dive into this?

    WolfShade
    Legend
    April 21, 2017

    Thank you for marking my answer correct.  I do appreciate it.

    jQuery.com has their own forum, which could be helpful.  Otherwise, you can find help on just about any web development forum.

    HTH,

    ^_^