Are you referring on the same code from this thread?
http://dynamicdrive.com/forums/showthread.php?t=37149

If so, change your script from:


inp1.setAttribute("name","Product" + rownum);
.
....