Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -----------------------
- <?php
- $counter = 0;
- foreach($db->getRecordSet($sqlRecord) as $row){ $counter += 1;
- ?>
- <tr id="rowDetails">
- <td> <?php echo($counter); ?> </td>
- <td > <?php echo($row['item_code']); ?> </td>
- <td > <?php echo($row['item_name']); ?> </td>
- <td > <?php echo($row['description']); ?> </td>
- <td > <?php echo($row['quantity']); ?> </td>
- <td > <?php echo($row['p_cost']); ?> </td>
- <td ><input type="button" name="edit" id="edit" value="edit" onClick="hideRow()" /></td>
- </td>
- </tr>
- <tr id="editContent" style="display:none;">
- <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>
- </tr>
- <?php
- }
- ?>
- </tr>
- <?php } ?>
- </table>
- -------------------------
- function hideRow(){
- if(
- document.getElementById('editContent').style.display=='none') {
- document.getElementById('editContent').style.display='';
- document.getElementById('rowDetails').style.display='none';
- }
- else
- {
- document.getElementById('editContent').style.display='none';
- document.getElementById('rowDetails').style.display='';
- }
Add Comment
Please, Sign In to add comment