Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<div class="row">
<div class="col-sm-5">
<div class="card">
<div class="card-header"><i class="fa fa-users"></i>&nbsp;Pegawai</div>
<div class="card-body" style="font-style: Calibri;font-size:12px">
<div class="form-group">
<label for="nip">NIP:</label>
<input type="text" class="form-control" name="nip" id="nip" placeholder="Enter NIP" />
<div class="form-group">
<label for="nama_pegawai">Nama Pegawai:</label>
<input type="text" class="form-control" name="nama_pegawai" id="nama_pegawai" readonly="true" />
<div class="form-group">
<label for="alamat">Alamat:</label>
<input type="text" class="form-control" name="alamat" id="alamat" readonly="true" />
<script type="text/javascript">
var delay = (function () {
var timer = 0;
return function (callback, ms) {
timer = setTimeout(callback, ms);
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
$("#nip").keyup(function () {
delay(function () {
var nip = $("#nip").val();
url: "{{ route('find.nip') }}",
data:"nip="+nip ,
}).success(function (data) {
var json = data,
obj = JSON.parse(json);
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment