From 5d776d4961571a2e80c3a1328f2cfac9bcd1ccc9 Mon Sep 17 00:00:00 2001 From: Mitchell Pomery <bob_george33@hotmail.com> Date: Mon, 10 Feb 2014 23:02:57 +0800 Subject: [PATCH] Added Ajax back to web requests --- web/web.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web/web.php b/web/web.php index 6d511b7..65d20c6 100644 --- a/web/web.php +++ b/web/web.php @@ -4,6 +4,7 @@ * using PHP because screw typing */ $cokeaddress = "http://130.95.13.96/"; + $cokeurl = $cokeaddress; ?> <!DOCTYPE html> <html> @@ -111,7 +112,12 @@ }); $(".brightness").change(function() { - console.log('<?=$cokeaddress?>/brightness?bright='+document.getElementById('bright').value); + console.log('<?=$cokeurl?>brightness?bright='+document.getElementById('bright').value); + $.ajax({ + url: '<?=$cokeaddress?>brightness?bright='+document.getElementById('bright').value, + dataType: "jsonp", + crossDomain: true + }); return false; }); -- GitLab