• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Slider and toggle button that update database in realtime

Contributor ,
Apr 21, 2017 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?

Views

749

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
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 21, 2017 Apr 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,

^_^

Votes

Translate

Translate
LEGEND ,
Apr 21, 2017 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,

^_^

Votes

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
community guidelines
Contributor ,
Apr 21, 2017 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?

Votes

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
community guidelines
LEGEND ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

LATEST

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,

^_^

Votes

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
community guidelines
Resources
Documentation