get files for dropdowns from/on selected servers

This commit is contained in:
mad
2018-08-20 18:56:48 +02:00
parent b224a88e7d
commit 40b341c626
3 changed files with 125 additions and 30 deletions
+42 -2
View File
@@ -11,6 +11,48 @@ function makeid() {
function dropdown(i,e) {
document.getElementById(i).innerHTML = e;
document.getElementById(i +'h').value = e;
if (i == "serverbutton") {
console.log("here");
$.ajax({
type: 'POST',
url: "?rand="+ makeid(),
data: "serverbuttoni="+e,
success: function(response) {
document.getElementById('cdromdiv').innerHTML = response;
},
});
console.log("a");
$.ajax({
type: 'POST',
url: "?rand="+ makeid(),
data: "serverbuttona="+e,
success: function(response) {
document.getElementById('drive1div').innerHTML = response;
},
});
console.log("b");
$.ajax({
type: 'POST',
url: "?rand="+ makeid(),
data: "serverbuttonb="+e,
success: function(response) {
document.getElementById('drive2div').innerHTML = response;
},
});
console.log("c");
$.ajax({
type: 'POST',
url: "?rand="+ makeid(),
data: "serverbuttonc="+e,
success: function(response) {
document.getElementById('drive3div').innerHTML = response;
},
});
}
}
function post(path, params, method) {
@@ -48,9 +90,7 @@ $('#confirm-delete').on('show.bs.modal', function(e) {
});
function submitbutton(formid){
console.log(formid);
data = $('#'+ formid).serialize();
console.log(data);
$.ajax({
type: 'POST',
url: "?rand="+ makeid(),