# Tutorial: Spark Variable and Function on One Web Page

**URL:** <https://community.particle.io/t/tutorial-spark-variable-and-function-on-one-web-page/4181>\
**Category:** Tutorials\
**Created:** [May 5, 2014, 2:00am UTC](https://community.particle.io/t/tutorial-spark-variable-and-function-on-one-web-page/4181 "2014-05-05T02:00:28Z")\
**Posts on this page:** 1\
**Showing post:** 71

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [December 9, 2018, 8:30am UTC](https://community.particle.io/t/tutorial-spark-variable-and-function-on-one-web-page/4181/71 "2018-12-09T08:30:59Z")

</div>

If you want to _update_ a variable on the device side, you need to register a `Particle.function()` (or `Particle.subscribe()`) as target for your POST request (or event in case of `Particle.subscribe()`).

Your code does only register `Particle.variable()` and they can **_only_** be **_requested_** (read but never set remotely) via GET.

---

_[View the full topic](https://community.particle.io/t/tutorial-spark-variable-and-function-on-one-web-page/4181)._
