corat-coret05


$("#vtype").change(function(){
var select_supplier = "";
var $dialog;

$.post("supplier_ppob.php",{vtype: $(this).val()},function(data){
if(data.error){
select_supplier = "Error:"+data.error;
alert(select_supplier);
}else{
var i;
select_supplier = "Pilih Supplier: <select id='select_supplier' name='select_supplier'>";
for(i = 0; i < data.supplier.length; i++){
select_supplier += "<option value='"+data.vtype_h2h[i]+"'>"+data.supplier[i]+"</option>";
}
select_supplier += "</select>";
$("#popup").html(select_supplier);
$dialog = $("#popup").dialog({
buttons : {
'Ok' : function() {
$("#supplier").val($("#select_supplier").val());
$(this).dialog("destroy");
},
'Batal' : function() {
$(this).dialog("destroy");
}
},
draggable : false,
hide : 'slide',
modal : true,
autoOpen : false
});
$dialog.dialog("open");
}
},"json");
});

Silahkan Komentar ... !

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s