Welcome !
         

 Obtaining Table Data from POST using VBScript

Author Message
Eric1728

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 1/25/2015
  • Status: offline
Obtaining Table Data from POST using VBScript Sunday, January 25, 2015 9:50 AM (permalink)
0
Hi, I am trying to obtain table data from a form for each cell after being submitted. I would like to somehow use VBScript to obtain the table 'recordTable' (which dynamically adds table rows on each click of the 'Add Record' button) from the previous page and then loop through each row and cell. Any help would be greatly appreciated, using Classic ASP. Code fragment of the table below:
 
   <
 <
 html>head>  
 <title></title>  
 <STYLE TYPE="text/css"> <!--
  
  
 TD{font-family: Arial; font-size: 8pt;}--->  
  
 }
  
 <
 .auto-style1 {height: 43px;</STYLE>script type="text/javascript" language="javascript">  
  
  
  
  
  
 element1.type =
 cell1.appendChild(element1);
  
  
 element2.type =
 cell2.appendChild(element2);
  
  
 element3.type =
 cell3.appendChild(element3);
  
  
 element4.type =
 cell4.appendChild(element4);
 }
  
  
  
  
  
  
  
  
 table.deleteRow(i); rowCount--; i--;
 }
 }
 }
  
 alert(e);
 }
 }
 function addRow(tableID) {var table = document.getElementById(tableID);var rowCount = table.rows.length;var row = table.insertRow(rowCount);var cell1 = row.insertCell(0);var element1 = document.createElement("input");"text"; element1.name = "txtbox1[]";var cell2 = row.insertCell(1);var element2 = document.createElement("input");"text"; element2.name = "textbox2[]";var cell3 = row.insertCell(2);var element3 = document.createElement("input");"text"; element3.name = "txtbox3[]";var cell4 = row.insertCell(3);var element4 = document.createElement("input");"text"; element4.name = "txtbox4[]";function deleteRow(tableID) {try {var table = document.getElementById(tableID);var rowCount = table.rows.length;for (var i = 0; i < rowCount; i++) {var row = table.rows[i];var chkbox = row.cells[0].childNodes[0];if (null != chkbox && true == chkbox.checked) {catch (e) { </
 
 
 script>head>
 <body>   
<form name="filter" method="POST" action="InventoryIssuesWrite.asp">   
<table class="norm sideBG" align="center" cellpadding="4" cellspacing="0" border="1" bordercolor="lightgrey" width="600px">   
<tr class="norm">   
<td class="bigger headerBG" align="center" colspan=6>   
<b>Inventory Issues</b>   
</td>   
</tr>   
<tr class="norm">   
<td>   
  
</td>   
</tr>   
<tr class="norm">   
<td class="norm" align ="right">   
<b>Enter Employee Number: </b><input type="text" id="employeeNum" name="employeeNum" <%=employeeNum %>" />   
<br />   
</td>   
</tr>   
<tr>   
<td class="norm"> To add more records click 'Add New Record'. Submit when all records are completed. 
  
<br />   
<br />   
<center>   
<input type="button" id="addRecord" value="Add Another Record" onclick="addRow('recordTable')"/>   
<input type="submit" id="sub" name="submit" class="norm" value="Submit">   
</center>   
</td>   
</tr>   
</table>   
<table class="norm sideBG" name="recordTable" id="recordTable" align="center" cellpadding="4" cellspacing="0" border="1" bordercolor="lightgrey" width="600px">   
<tr class="norm">   
<td>   
<b><u> PART #</u></b>   
</td>   
<td>   
<b><u>LOCATION</u></b>   
</td>   
<td>   
<b><u>QUANTITY</u></b>   
</td>   
<td>   
<b><u>WHERE USED</u></b>   
</td>   
</tr>   
</table>   
<table class="norm sideBG" align="center" cellpadding="4" cellspacing="0" border="1" bordercolor="lightgrey" width="600px">   
  
</table>   
</ 
</form>body> </ 
html> 

<message edited by Eric1728 on Sunday, January 25, 2015 9:54 AM>
 
#1
    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2017 ASPPlayground.NET Forum Version 3.9