Project help - HTML and jquery form coding

I started a new project with my particle photon and was using it to control LED lighting, some 433mhz RF wireless outlets, and a dallas temperature sensor. I was previously using an arduino but I thought it would be fun to try using the photon instead. My code is up and running and everything generally works the way I’d like it to but I now wanted to build a small internal webpage hosted on apache on a raspberry pi that I can access via an iPhone. I started to build the webpage (keep in mind I don’t know much about web development) and I’m now trying to figure out how to get my webpage to post to the a spark.function that exists in the cloud. Any help or tips on the next step would be appreciated. I’m trying to use jQuery sliders to control the PWM values (0-255) for each bank of LEDs that I am driving. Some sampled code is below.

Any thoughts on how to get this connected? The website will only remain internal so I’m not all that concerned about having the token in my code. I could create a separate spark function for each bank of LEDs but would prefer to only require one function to control the lights. I have posted the jquery form from my code below but can post the entire html if helpful. Please let me know if I’m going about this the wrong way.

      <p><b>LED Values</b></p>
        <form method="post" action="">
                <label for="warm">Warm:</label>
                <input type="range" name="warm" id="warm" value="0" min="0" max="255" data-highlight="true">
                <label for="cool">Cool:</label>
                <input type="range" name="cool" id="cool" value="0" min="0" max="255" data-highlight="true">
                <label for="cool">Blue:</label>
                <input type="range" name="blue" id="blue" value="0" min="0" max="255" data-highlight="true">
                <input type="submit" data-inline="true" value="Submit">
        </form>

Take a look at this (awesome) tutorial:

Also, the Javascript SDK might be interesting:
https://docs.particle.io/reference/javascript/#callfunction

I personally wouldn't use forms. You can use sliders to change the values after a set amount of ms of no change (to prevent spamming, debounce)
There are also some neat javascript libraries for color pickers. Fun when you have RGB LEDs :smile:

Thanks very much. All of this looks very helpful!