2019-12-11 02:22:06 +01:00
|
|
|
$(document).ready(function(){
|
|
|
|
|
2019-12-11 06:51:01 +01:00
|
|
|
$( "#focus" ).click(function() {
|
|
|
|
focus("ON")
|
2019-12-11 02:22:06 +01:00
|
|
|
});
|
|
|
|
|
2019-12-11 06:51:01 +01:00
|
|
|
|
|
|
|
$( "#pump" ).click(function() {
|
|
|
|
pump()
|
|
|
|
|
|
|
|
});
|
2019-12-11 07:29:42 +01:00
|
|
|
$( "#write" ).click(function() {
|
|
|
|
write()
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2019-12-11 06:51:01 +01:00
|
|
|
|
2019-12-11 02:22:06 +01:00
|
|
|
|
|
|
|
|
2019-12-11 07:29:42 +01:00
|
|
|
function focus(toggler) {
|
|
|
|
var value = $("#nb_step").val();
|
|
|
|
var orientation = $("#orientation").val();
|
|
|
|
var xmlhttp = new XMLHttpRequest();
|
|
|
|
xmlhttp.open("GET", "pipeline/focus.php?nb_step="+value+"&orientation="+orientation+"&toggler="+toggler, true);
|
|
|
|
xmlhttp.send();
|
2019-12-11 00:31:06 +01:00
|
|
|
}
|
2019-12-11 02:22:06 +01:00
|
|
|
|
2019-12-11 07:29:42 +01:00
|
|
|
function pump() {
|
|
|
|
var volume = $("#volume").val();
|
|
|
|
var flowrate = $("#flowrate").val();
|
|
|
|
var direction = $("#direction").val();
|
|
|
|
var xmlhttp = new XMLHttpRequest();
|
|
|
|
xmlhttp.open("GET", "pipeline/pump.php?volume="+volume+"&flowrate="+flowrate+"&direction="+direction, true);
|
|
|
|
xmlhttp.send();
|
2019-12-11 06:51:01 +01:00
|
|
|
}
|
2019-12-11 07:29:42 +01:00
|
|
|
|
|
|
|
function write(){
|
|
|
|
|
|
|
|
var xmlhttp = new XMLHttpRequest();
|
|
|
|
xmlhttp.open("GET", "pipeline/write.php?txt=ceciestuntexte", true);
|
|
|
|
xmlhttp.send();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2019-12-11 02:22:06 +01:00
|
|
|
});
|