0

I want a sliding switch. On the left would be Off and on the right would be On. When the user toggles the switch, a callback to the database would establish if the item linked to the button is still available (green light) or not (red light)

Any idea how to do this?

flown
  • 21
  • 3
  • There are millions of way you could connect a slide switch to a database query. – Rasika Sep 17 '15 at 04:19
  • jquery - you can read about it [here](https://learn.jquery.com/using-jquery-core/faq/how-do-i-determine-the-state-of-a-toggled-element/) – Kuya Sep 17 '15 at 04:29
  • More specifically than jQuery: use AJAX. [With jQuery](http://stackoverflow.com/questions/5645602/how-to-use-ajax-with-jquery) and [without jQuery](http://stackoverflow.com/questions/8567114/how-to-make-an-ajax-call-without-jquery). Second link actually shows both with and without jQuery in the answer –  Sep 17 '15 at 05:41

0 Answers0