Last active
February 2, 2016 23:17
-
-
Save LelandSindt/faa038e014e3a147332d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> <head> <title> Color </title> <link rel="shortcut icon" href="data:image/vnd.microsoft.icon;base64,AA =="></link> | |
<script> var HttpRequestObject = false; | |
if (window.XMLHttpRequest) { HttpRequestObject = new XMLHttpRequest(); } else if (window.ActiveXObject) { HttpRequestObject = new ActiveXObject('Microsoft.XMLHTTP'); } | |
function changeColor() { if(HttpRequestObject) { HttpRequestObject.open('GET', 'http://nuru.local/setcolor?red=' + document.options.red.value + '&green=' + document.options.green.value +'&blue=' + document.options.blue.value, true); HttpRequestObject.send(); } } | |
</script> </head> <body> | |
<form name='options'> | |
Red <input type=range min=0 max=255 step=1 value=0 name='red' onchange='changeColor();'> <br> | |
Green <input type=range min=0 max=255 step=1 value=0 name='blue' onchange='changeColor();'> <br> | |
Blue <input type=range min=0 max=255 step=1 value=0 name='green' onchange='changeColor();'> <br> | |
</form> | |
</body> </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment