RSS Forums RSS
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 689 | Replies: 1 | Thread Tools  Display Modes
Reply
Join Date: Oct 2007
Posts: 6
Reputation: priyapratheep is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
priyapratheep priyapratheep is offline Offline
Newbie Poster

Problem in naming the cloned rows

  #1  
Oct 21st, 2007
Hi friends,

I am java programmer .I am doing one simple job in javascript.i totally struck with this code for last two days..
Pleas help me to sort out.

My problem is i cloned row in the table each row contains two select button and three text box.I want to change the names of the select and input boxes.
var counter = 0;
var rowNum =0;
function addRowToTable()
{
  counter++;
  
   tabBody = document.getElementById('tblSample').firstChild;
   newRow = tabBody.appendChild(tabBody.firstChild.nextSibling.cloneNode(true));
   rowNum = rowNum + 1;
   for (i = 0; i < newRow.cells.length; i++) 
              newRow.cells[i].name = theName + counter;
   }

please help me

priya
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2007
Location: Brisbane, Australia
Posts: 306
Reputation: sillyboy is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 17
sillyboy's Avatar
sillyboy sillyboy is offline Offline
Posting Whiz

Re: Problem in naming the cloned rows

  #2  
Oct 21st, 2007
Do just a couple of things that may cause you code not to work. I hope you are closing
addRowToTable()? And also, what is theName?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:22 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC