Skip to content

Commit

Permalink
Clean Up Java
Browse files Browse the repository at this point in the history
Clean up the javascript so there is only one callback to doc.ready
  • Loading branch information
The009 committed Jan 18, 2020
1 parent ea1bee7 commit 0d78d18
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@ function displayDeviceList($csv){
?>
<!-- JavaScript for sending of data -->
<script type="text/javascript">
$( document ).ready(function() {
<?php

foreach($csv as $i => $item) {
if($item['deviceType'] == "HS220"){
echo <<<EOD
$( document ).ready(function() {
$("#dimmverValue{$i}").change(function() {
$.ajax({
url: 'send.php',
Expand All @@ -59,11 +58,12 @@ function displayDeviceList($csv){
}
});
});
});
EOD;
}
}
?>
});

function SingleSend( givenIp, givenPort, reqAction, devTyp){
var ip = givenIp;
var port = givenPort;
Expand Down

0 comments on commit 0d78d18

Please sign in to comment.