Browse Source

made stop button red, configured for external access (using ip) to convert into app

master
Sean Clarke 2 years ago
parent
commit
bae31e3e2b
  1. 13
      index.html
  2. 4
      main.css

13
index.html

@ -10,18 +10,27 @@
<a href='#' onclick="radio(1);">Seanland's Game Music</a>
<a href='#' onclick="radio(2);">Seanland's Top 100s</a>
<a href='#' onclick="radio(3);">Seanland's Collection</a>
<a href='#' onclick="radio(stop);">Stop Music</a>
<a href='#' onclick="radio(stop);" class="stop">Stop Music</a>
<script type='text/javascript'>
//AJAX function
function radio(com) {
// change IP based on the player's address
var ip = "192.168.1.40";
$.ajax({
type: "POST",
url: "radio.php",
url: "http://" + ip + "/radio.php",
xhrFields: {
withCredentials: true
},
data: "radio=" + com,
success: function(msg){
// may add in the future
},
error: function (xhr, status) {
// handle errors
}
});
}

4
main.css

@ -15,3 +15,7 @@ a {
padding: 24px;
margin: 12px;
}
a.stop {
background: red;
}
Loading…
Cancel
Save