save dynamically created table in sql using asp

Thread Solved

Join Date: Jun 2008
Posts: 185
Reputation: aashishn86 is an unknown quantity at this point 
Solved Threads: 9
aashishn86's Avatar
aashishn86 aashishn86 is offline Offline
Junior Poster

save dynamically created table in sql using asp

 
0
  #1
Jul 7th, 2009
hiii
i am using the following functions in javascript to dynamically add and remove rows from a table...

  1. function addRow()
  2. {
  3.  
  4. //add a row to the rows collection and get a reference to the newly added row
  5. var newRow = document.all("applications").insertRow();
  6. //add 3 cells (<td>) to the new row and set the innerHTML to contain text boxes
  7.  
  8. var oCell = newRow.insertCell();
  9.  
  10. oCell.innerHTML = "<input type='text' name='application_name' class='cellData' maxlength='20' style='width:220px;height:17px'size='45' title='Enter Application Name'>";
  11. oCell = newRow.insertCell();
  12. oCell.innerHTML = "<input type='text' name='application_add_ticket_no' class='cellData' maxlength='20' style='width:220px;height:17px'size='45' title='Enter Application Access Ticket Number'>";
  13. oCell = newRow.insertCell();
  14. oCell.innerHTML = "<input type='text' name='application_add_date' class='cellData' maxlength='10' style='width:220px;height:17px'size='45' title='Enter Applicatin Access Date' value='mm/dd/yyyy'>";
  15. oCell = newRow.insertCell();
  16. oCell.innerHTML = "<a href='javascript:void();' onclick='removeRow(this);'><font color='red' size='5'>-</font></a>";
  17. oCell = newRow.insertCell();
  18. oCell.innerHTML = "<a href='javascript:void();' onclick='addRow(this);'><font color='blue' size='4'>+</font></a>";
  19. }
  20.  
  21. function removeRow(src)
  22. {
  23. var oRow = src.parentElement.parentElement;
  24. document.all("applications").deleteRow(oRow.rowIndex);
  25.  
  26. }

i need to store these values in sql server...
can anyone show me the way to do that ??
thanks....
rEaLITy iS aN iLLUSIOn cAUSED bY lACk oF aLCOHOL....
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 30
Reputation: punitdam is an unknown quantity at this point 
Solved Threads: 3
punitdam's Avatar
punitdam punitdam is offline Offline
Light Poster

Re: save dynamically created table in sql using asp

 
1
  #2
Jul 14th, 2009
You can use following code to fetch form details
'  Request("application_name").count to get the number of rows
For count=1 to Request("application_name").count
        application_name = Request("application_name ")(count)
        application_add_ticket_no = Request("application_add_ticket_no")(count)
        application_add_date = Request("application_add_date")(count)
        ' code to store details in sqlserver will come here.
 
next
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 185
Reputation: aashishn86 is an unknown quantity at this point 
Solved Threads: 9
aashishn86's Avatar
aashishn86 aashishn86 is offline Offline
Junior Poster

Re: save dynamically created table in sql using asp

 
0
  #3
Jul 15th, 2009
yups
figured that out.............
thanks...
rEaLITy iS aN iLLUSIOn cAUSED bY lACk oF aLCOHOL....
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 30
Reputation: punitdam is an unknown quantity at this point 
Solved Threads: 3
punitdam's Avatar
punitdam punitdam is offline Offline
Light Poster

Re: save dynamically created table in sql using asp

 
0
  #4
Jul 16th, 2009
no probs.
Please mark thread as solved.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC