Tutorial: Spark Variable and Function on One Web Page

You should check out this post where I wrote some code for a pump controller with a web page interface: