Hai all, I have been designing a page where user enters some details, after they click add button, a row will be populated with the details they added. As i donno the number of rows populated, i have used DOM and generating new row dynamically each time user clicks ADD button. Each row will have set of text boxes holding the details that user entered. Text boxes too will be added and named dynamically. User will submit the details after a set of rows populated. Now i need to switch over to ASP script just store the submitted details to Database. What is my Doubt here is "How will i access the text boxes using ASP script that are created and named dynamically " this how ========================================================== Txt = Txt + 1 TxtName = "DenVal" + Txt DEN = ("DEN: " + document.MainForm.DEN1.value + "-" + document.MainForm.Met2.value+ "-" + document.MainForm.Met3.value + "-" + document.MainForm.Met4.value) document.MainForm.DEN.value = DEN //this is how i am creating and naming text boxes dynamically TD2.innerHTML = TD2.innerHTML + "<input type=\"text\" name=\"" + TxtName + "\" value=\"" + DEN + "\">" =========================================================
TD2.innerHTML += "<input type='text' name='" + TxtName + "' value='" + DEN + "'>"; Do that. And also you can add it this way: What you did was not DOM, this is DOM: var x; var z = document.getElementById("MainForm"); x = document.createElement("input"); x.setAttribute("type", "text"); x.setAttribute("name", TxtName); x.setAttribute("value", DEN); z.appendChild(x); You can add things dynamically by making loops: like (i dont know ASP) LooP { %> <script></script> <% } %>