daily pastebin goal
32%
SHARE
TWEET

Untitled

a guest Nov 18th, 2017 61 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.opener.input_keyup(window.opener.document.getElementById('harga'),'harga');
  9. window.close();  
  10. }  
  11. </script>
  12. </head>
  13. <body>
  14. <p>&nbsp;</p>
  15. <form id="form1" name="form1" method="get" action="">
  16.   <label for="material">Material</label>
  17.   <input type="text" name="material" id="material" />
  18.   <input type="submit" name="search" id="search" value="Search" />
  19. </form>
  20. <p>&nbsp;</p>
  21. <table width="550" border="1" cellpadding="0">
  22.   <tr>
  23.     <td width="25">No</td>
  24.     <td width="79">Code</td>
  25.     <td width="243">Material</td>
  26.     <td width="70">Uom</td>
  27.     <td width="100">Harga</td>
  28.     <td width="80">Tgl</td>
  29.     <td width="46">Click</td>
  30.   </tr>
  31.   <?php
  32.   $i=1;
  33.    do {
  34.       $id= $row_mm['id']; ?>
  35.     <tr>
  36.       <td><?php echo $i++; ?></td>
  37.       <td id="kd<?php echo $id; ?>"><?php echo $row_mm['kode']; ?></td>
  38.       <td id="cm<?php echo $id; ?>"><?php echo $row_mm['nama']; ?></td>
  39.       <td id="tp<?php echo $id; ?>"><?php echo $row_mm['uom']; ?></td>
  40.       <td id="tx<?php echo $id; ?>"><?php echo $row_mm['harga']; ?></td>
  41.       <td id="ty<?php echo $id; ?>"><?php echo $row_mm['tgl']; ?></td>
  42.       <td><div align="center"><a href="#" onclick="javascript:insertcustomer('<?php
  43. echo $id; ?>');">Click</a></div></td>
  44.     </tr>
  45.     <?php } while ($row_mm = mysql_fetch_assoc($mm)); ?>
  46. </table>
  47. <p>&nbsp;</p>
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