SHARE
TWEET

Untitled

a guest Oct 24th, 2018 40 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <body>
  3. <form action="api/insertreqmpro.php" method="POST">
  4.                     <div class="form-group row">
  5.                             <label class="col-sm-12 col-md-2 col-form-label">Request No</label>
  6.                             <div class="col-sm-12 col-md-12 input-group">
  7.                                 <input class="form-control" type="text" name="requestnumber" placeholder="Nomor Request">
  8.                                 <button type="button" class="btn btn-primary" name="button" onclick="window.location.href='javascript: buka_popup();'"><i class="icon-copy fa fa-folder-open" aria-hidden="true"></i></button>
  9.                             </div>
  10.                         </div>
  11.                         <div class="form-group row">
  12.                             <label class="col-sm-12 col-md-2 col-form-label">Request Date</label>
  13.                             <div class="col-sm-12 col-md-12">
  14.                                 <input class="form-control date-picker" name="requestdate" placeholder="Select Date" type="text">
  15.                             </div>
  16.                         </div>
  17.                         <div class="table-responsive">
  18.                         <table class="table table-striped" id="crud_table">
  19.                             <thead>
  20.                                 <tr>
  21.                                     <th >#</th>
  22.                                     <th >PartID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
  23.                                     <th >PartName</th>
  24.                                     <th >LocationID</th>
  25.                                     <th >UnitID</th>
  26.                                     <th >Qty&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
  27.                                     <th >Note&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
  28.                                     <th >Hapus</th>
  29.                                 </tr>
  30.                             </thead>
  31.                             <tbody>
  32.                                 </tbody>
  33.                         </table>
  34.                         </div>
  35.                          <button type="button" name="add" id="add" class="btn btn-success btn-xs">+</button>
  36.                          <button type="submit" class="btn btn-outline-primary" onclick="confirm('Are you sure you want to save this transaction?');">Simpan</button>
  37.                     </div>
  38.        
  39.         </form>
  40. <script>
  41. $(document).ready(function(){
  42.  var count = 0;
  43.  $('#add').click(function(){
  44.   count = count + 1;
  45.   var html_code = "<tr id='detailrequest"+count+"'>";
  46.   html_code += "<td><button type='button' class='btn btn-primary' name='button'  onclick='buka_popup();'><i class='icon-copy fa fa-search' aria-hidden='true'></i></button></td>";
  47.    html_code += "<td><input type='text' id='PartID"+count+"'name='PartID[]' class='form-control'></input></td>";
  48.    html_code += "<td></td>";
  49.    html_code += "<td></td>";
  50.    html_code += "<td></td>";
  51.    html_code += "<td><input type='number' name='QtyReq[]' class='form-control'></input></td>";
  52.    html_code += "<td><input type='text' class='form-control' name='Notes[]'></td>";
  53.    html_code += "<td><button type='button' class='btn btn-sm btn-default' onclick='deleterow("+count+")'>x</button></td>";
  54.    html_code += "</tr>";  
  55.    $('#crud_table').append(html_code);
  56.    //$('#tabledata').val(count);
  57.  });
  58.  
  59.  });
  60.   function deleterow(count) {
  61.     var x = confirm("Are you sure to delete?"+count);
  62.     if (x == true ) {
  63.         $('#detailrequest'+ count).remove();
  64.         //$('#rowTableDowntime_' + row).remove();
  65.     }
  66. }
  67. function buka_popup(){
  68.  window.open('datapart.php', '', 'width=600, height=300, location=yes,scrollbars=yes, resizeable=yes, status=yes, copyhistory=no,toolbar=no');
  69. }
  70.  </script>
  71.  
  72. </body>
  73. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top