Highlighted

Slider and toggle button that update database in realtime

Participant ,
Apr 21, 2017

Copy link to clipboard

Copied

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?

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,

^_^

Views

556

Likes

Translate

Translate

Report

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

Slider and toggle button that update database in realtime

Participant ,
Apr 21, 2017

Copy link to clipboard

Copied

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?

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,

^_^

Views

557

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 21, 2017 0
LEGEND ,
Apr 21, 2017

Copy link to clipboard

Copied

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,

^_^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 21, 2017 0
Participant ,
Apr 21, 2017

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 21, 2017 0
LEGEND ,
Apr 21, 2017

Copy link to clipboard

Copied

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,

^_^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 21, 2017 1