Advertisement

05.01.2008 at 01:24PM PDT, ID: 23369946
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.2

Generate table rows dynamically

Asked by YZlat in JavaScript, MS SQL Server

I have the following html code on my ASP page (I am using classic ASP)

<TABLE id="Table1">
<TBODY>
<TR>
<TD>Col1
</TD>
<TD>Col2</TD>
<TD>Col3</TD>

</TR>
<TR>
<TD vAlign="top"><INPUT name="First_1"></TD>
<TD vAlign="top"><INPUT name="Second_1"></TD>
<TD vAlign="top"><INPUT name="Third_1"></TD>                                                                              
</TR>
</TBODY>
</TABLE>
<DIV id="div2"></DIV>

<INPUT onclick="generateRow()" type="button" value="Add Another">

I need to generate additional rows for the table above. I am using the following javascript to do so

function generateRow() {      
var d=document.getElementById("div2");      
d.innerHTML+='<tr><td valign="top" >&nbsp;<input name="First_1" type="text" >&nbsp;</td>';
d.innerHTML+='<td valign="top" ><input name="Second_1" type="text" >&nbsp;</td>';      
d.innerHTML+='<td valign="top" ><input name="Third_1" type="text" >&nbsp;</td></tr>';      
d.innerHTML+="</div>";
}

but there is one problem - the textboxes in each row have the same name i.e I get:

<TABLE id="Table1">
<TBODY>
<TR>
<TD>Col1
</TD>
<TD>Col2</TD>
<TD>Col3</TD>

</TR>
<TR>
<TD vAlign="top"><INPUT name="First_1"></TD>
<TD vAlign="top"><INPUT name="Second_1"></TD>
<TD vAlign="top"><INPUT name="Third_1"></TD>                                                                              
</TR>
<TR>
<TD vAlign="top"><INPUT name="First_1"></TD>
<TD vAlign="top"><INPUT name="Second_1"></TD>
<TD vAlign="top"><INPUT name="Third_1"></TD>                                                                              
</TR>
</TBODY>
</TABLE>

and what I want is to increment the numbers of the rows added so that my table would look like this:

<TABLE id="Table1">
<TBODY>
<TR>
<TD>Col1
</TD>
<TD>Col2</TD>
<TD>Col3</TD>

</TR>
<TR>
<TD vAlign="top"><INPUT name="First_1"></TD>
<TD vAlign="top"><INPUT name="Second_1"></TD>
<TD vAlign="top"><INPUT name="Third_1"></TD>                                                                              
</TR>
<TR>
<TD vAlign="top"><INPUT name="First_2"></TD>
<TD vAlign="top"><INPUT name="Second_2"></TD>
<TD vAlign="top"><INPUT name="Third_2"></TD>                                                                              
</TR>
</TBODY>
</TABLE>

I want to do that dynamically using javascript. Could anyone help?Start Free Trial
 
Loading Advertisement...
 
[+][-]05.01.2008 at 01:28PM PDT, ID: 21482417

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.02.2008 at 01:09AM PDT, ID: 21485175

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.02.2008 at 06:41AM PDT, ID: 21486526

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.02.2008 at 06:54AM PDT, ID: 21486637

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.02.2008 at 07:03AM PDT, ID: 21486717

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.02.2008 at 08:01AM PDT, ID: 21487195

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.02.2008 at 08:13AM PDT, ID: 21487296

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.02.2008 at 08:51AM PDT, ID: 21487645

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.02.2008 at 09:29AM PDT, ID: 21487993

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.02.2008 at 10:35AM PDT, ID: 21488527

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.02.2008 at 11:05AM PDT, ID: 21488729

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.05.2008 at 06:41AM PDT, ID: 21499921

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: JavaScript, MS SQL Server
Sign Up Now!
Solution Provided By: YZlat
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.12.2008 at 08:44PM PDT, ID: 21552166

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 06:18AM PDT, ID: 21554731

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 08:41AM PDT, ID: 21556161

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628