//Script by Sebastian Wirajaya
function showloading() {
$("#loading").fadeIn("slow");
}
function hideloading() {
$("#loading").fadeOut("slow");
}
function buka(nama) {
$("#konten").html('
');
$.ajax({
url: nama + '.php',
type: 'GET',
dataType: 'html',
success: function (isi) {
$("#konten").html(isi);
},
});
}
function showpage2(nama) {
$.ajax({
type: "GET",
url: link,
beforeSend: showloading(),
success: function (msg) {
$("#indexmain2").hide();
$("#indexmain2").html(msg).show("slow");
hideloading();
},
error: function (msg) {
$("#indexmain2").html("
Ajax loading error, please try again.").show("slow");
hideloading();
}
//, complete: hideloading()
});
}
function post() {
$("#loadingresult").fadeIn("slow");
$("#loading").fadeIn("slow");
$("input").attr("disabled", "disabled");
$("select").attr("disabled", "disabled");
$("button").attr("disabled", "disabled");
$("textarea").attr("disabled", "disabled");
}
function result() {
$("#loadingresult").fadeOut("slow");
$("#loading").fadeOut("slow");
$("input").removeAttr("disabled");
$("select").removeAttr("disabled");
$("button").removeAttr("disabled");
$("textarea").removeAttr("disabled");
}