daily pastebin goal
51%
SHARE
TWEET

Untitled

a guest Nov 15th, 2017 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script src="scripts.js" type="text/javascript"></script>
  2. <script>
  3. function insertcustomer(id) {  
  4. var material=document.getElementById("cm"+id).innerHTML;
  5. var harga=document.getElementById("tx"+id).innerHTML;
  6. window.opener.document.getElementById('material').value =material;
  7. window.opener.document.getElementById('harga').value =harga;
  8. window.close();  
  9. }  
  10. </script>
  11. <style type="text/css">
  12. body,td,th {
  13.     font-family: Georgia, "Times New Roman", Times, serif;
  14.     font-size: 11px;
  15. }
  16. </style>
  17.  
  18. <body>
  19. <p>&nbsp;</p>
  20. <form id="form1" name="form1" method="get" action="">
  21.   <label for="material">Material</label>
  22.   <input type="text" name="material" id="material" />
  23.   <input type="submit" name="search" id="search" value="Search" />
  24. </form>
  25. <p>&nbsp;</p>
  26. <table width="550" border="1" cellpadding="0">
  27.   <tr>
  28.     <td width="25">No</td>
  29.     <td width="79">Code</td>
  30.     <td width="243">Material</td>
  31.     <td width="70">Uom</td>
  32.     <td width="100">Harga</td>
  33.     <td width="80">Tgl</td>
  34.     <td width="46">Click</td>
  35.   </tr>
  36.   <?php
  37.   $i=1;
  38.    do {
  39.       $id= $row_mm['id']; ?>
  40.     <tr>
  41.       <td><?php echo $i++; ?></td>
  42.       <td id="kd<?php echo $id; ?>"><?php echo $row_mm['kode']; ?></td>
  43.       <td id="cm<?php echo $id; ?>"><?php echo $row_mm['nama']; ?></td>
  44.       <td id="tp<?php echo $id; ?>"><?php echo $row_mm['uom']; ?></td>
  45.       <td id="tx<?php echo $id; ?>"><?php echo $row_mm['harga']; ?></td>
  46.       <td id="ty<?php echo $id; ?>"><?php echo $row_mm['tgl']; ?></td>
  47.       <td><div align="center"><a href="#" onclick="javascript:insertcustomer('<?php
  48. echo $id; ?>');">Click</a></div></td>
  49.     </tr>
  50.     <?php } while ($row_mm = mysql_fetch_assoc($mm)); ?>
  51. </table>
  52. <p>&nbsp;</p>
  53. </body>
  54. </html>
RAW Paste Data
Top