$(document).ready(function() { $('#fshasil').invisibleEl(); /* dialog */ $('#dialogcaripelanggan').jqm({ modal: true, trigger: '#btncarinama', overlay: 30, overlayClass: 'whiteOverlay', onShow : function(hash){ hash.w.fadeIn(50); }, onHide : function(hash){ hash.w.fadeOut(50, function(){if(hash.o) hash.o.remove();}); $('input[name="txtcari"]').val(''); $('#hasil').empty(); } }); // Close Button Highlighting. IE doesn't support :hover. Surprise? $('input.jqmdX') .hover( function(){ $(this).addClass('jqmdXFocus'); }, function(){ $(this).removeClass('jqmdXFocus'); }) .focus( function(){ this.hideFocus=true; $(this).addClass('jqmdXFocus'); }) .blur( function(){ $(this).removeClass('jqmdXFocus'); }); $('input[name="tgllahir"]').datepicker({ dateFormat: 'dd-mm-yy', changeMonth: true, changeYear: true, yearRange: '1900:2009', }); // ambil data $('form[name="fcaripelanggan"]').submit(function(){ var postvars = { txtcari: $("input[name='txtcari']").val(), operation: "caripelanggan", status: "ok" }; $.post('ajaxpelanggan.php', postvars, function(data) { var pelanggan = eval('('+data+')'); var hasil;//[pelanggan.length]; var tabel = "
| Kode | Nama | Alamat | Batas Bon | Nilai Bon |
| "+pelanggan[i].kd_customer+" | "; tabel += "" + pelanggan[i].nama + " | " + pelanggan[i].alamat + " | "; tabel += "" + pelanggan[i].bts_bon + " | " + pelanggan[i].nilai_bon + " |