Guest User

Untitled

a guest
Jan 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. -----------------------
  2. <?php
  3. $counter = 0;
  4. foreach($db->getRecordSet($sqlRecord) as $row){ $counter += 1;
  5. ?>
  6. <tr id="rowDetails">
  7. <td> <?php echo($counter); ?> </td>
  8.  
  9. <td > <?php echo($row['item_code']); ?> </td>
  10. <td > <?php echo($row['item_name']); ?> </td>
  11. <td > <?php echo($row['description']); ?> </td>
  12. <td > <?php echo($row['quantity']); ?> </td>
  13. <td > <?php echo($row['p_cost']); ?> </td>
  14.  
  15. <td ><input type="button" name="edit" id="edit" value="edit" onClick="hideRow()" /></td>
  16. </td>
  17. </tr>
  18. <tr id="editContent" style="display:none;">
  19. <td class="w10" id="row1"><input type="text" class="form-control" name="item_code" id="item_code" value="<?php echo($row['item_code']); ?>" required="required" /></td>
  20. </tr>
  21.  
  22. <?php
  23. }
  24. ?>
  25. </tr>
  26. <?php } ?>
  27. </table>
  28.  
  29.  
  30. -------------------------
  31. function hideRow(){
  32. if(
  33. document.getElementById('editContent').style.display=='none') {
  34. document.getElementById('editContent').style.display='';
  35. document.getElementById('rowDetails').style.display='none';
  36. }
  37. else
  38. {
  39. document.getElementById('editContent').style.display='none';
  40. document.getElementById('rowDetails').style.display='';
  41. }
Add Comment
Please, Sign In to add comment