D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
diafrica
/
result.dominicaninstitute.org
/
jay
/
Filename :
script.js
back
Copy
$(document).ready(function(){ // Begin $('.dactiond').click(function(){ /* $("#div1").load("jay/demo_test.txt", function(responseTxt, statusTxt, xhr){ if(statusTxt == "success") alert("External content loaded successfully!"); if(statusTxt == "error") alert("Error: " + xhr.status + ": " + xhr.statusText); }); $.get("jay/demo_test.php", { name:"Ralph", town:"Chuks" }, function(data, status){ alert("Data: " + data + "\nStatus: " + status); }); $.post("jay/demo_test_post.php", { name: "Donald Duck", city: "Duckburg" }, function(data, status){ alert("Data: " + data + "\nStatus: " + status); }); */ var el = this; var id = this.id; var splitid = id.split("_"); // The Link id var dpage = splitid[0]; var daction = splitid[1]; var dtab = splitid[2]; var dses = splitid[3]; var did = splitid[4]; var dmessage = splitid[5]; var dmessage2 = splitid[6]; var dmatric = splitid[7]; var le = "#dd"+did; var dmsg=dmessage + dmessage2 + " " + dmatric; if (dmessage2=="UnSuspend"){ var sam1 = "suspend"; var sam2 = "Suspend"; var sam3 = "good"; var wumi = dpage + "_" + sam1 + "_" + dtab + "_" + dses + "_" + did + "_" + dmessage + "_" + sam2 + "_" + dmatric; } if (dmessage2=="UnExpel"){ var sam1 = "expel"; var sam2 = "Expel"; var sam3 = "good"; var wumi = dpage + "_" + sam1 + "_" + dtab + "_" + dses + "_" + did + "_" + dmessage + "_" + sam2 + "_" + dmatric; } if (dmessage2=="Suspend"){ var sam1 = "good"; var sam2 = "UnSuspend"; var sam3 = "suspend"; var wumi = dpage + "_" + sam1 + "_" + dtab + "_" + dses + "_" + did + "_" + dmessage + "_" + sam2 + "_" + dmatric; } if (dmessage2=="Expel"){ var sam1 = "good"; var sam2 = "UnExpel"; var sam3 = "expel"; var wumi = dpage + "_" + sam1 + "_" + dtab + "_" + dses + "_" + did + "_" + dmessage + "_" + sam2 + "_" + dmatric; } // Begin the Action if(daction==sam3){ // Confirm box bootbox.confirm(dmsg, function(result) { //alert(le) //bootbox.alert("I dey here oooo"); if(result){ // AJAX Request $.ajax({ url: 'jay/forall_ajax.php', type: 'POST', data: { tab:dtab, ses:dses, id:did, action:daction }, success: function(result,status,xhr){ // Removing row from HTML Table $(el).closest('tr').css('background-color','#ddd'); $(el).html(sam2); $(el).attr('id', wumi); $(le).html(sam3); var div = $(el).closest('tr'); div.animate({fontSize: '18px', opacity: '0.4'}, "slow"); div.animate({fontSize: '14px', opacity: '1.0'}, "slow"); //alert(result + ": " + status + ": " + xhr.status + ": " + xhr.statusText); }, error: function(xhr,status,error){ alert("Error: " + xhr.status + ": " + xhr.statusText + ": " + status + ": " + error); } }); } else { bootbox.alert("You cancelled the action"); } }); } //End the Action }); //End });