User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 456,569 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,575 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 652 | Replies: 1
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: 227
Reputation: sillyboy is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 13
sillyboy's Avatar
sillyboy sillyboy is offline Offline
Posting Whiz in Training

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.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 5:56 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC