I'm not sure how to add a row where I want it.\[code\]<script language="javascript">var i = 1;function changeIt(){ i++; my_div.innerHTML = my_div.innerHTML +"<tr><td valign='middle'><strong>URL "+ i+":</strong></td><td><input name='url'+ i type='text' size='40' /></td></tr>"}</script><form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>"> <table width="300px"> <tr> <td valign="middle"><strong>Name:</strong></td> <td><input name="name" type="text" size="40" /></td> </tr> <tr> <td valign="middle"><strong>Password:</strong></td> <td><input name="password" type="text" size="40" /></td> </tr> <tr> <td valign="middle"><strong>URL:</strong></td> <td><input name="url" type="text" size="40" /><a href="" onClick="changeIt();return false;">+</a></td> </tr> <tr id="my_div"></tr> <tr> <td valign="middle"><strong>ETC:</strong></td> <td><input name="etc" type="text" size="40" /></td> </tr>\[/code\]
The following is where I want the rows to appear:\[code\]<tr id="my_div"></tr> \[/code\]Currently that produces new rows within a row. I don't want that. I only want a new row not in a row.When I click the + I want it to produce:\[code\] <tr> <td valign="middle"><strong>URL 2:</strong></td> <td><input name="url2" type="text" size="40" /></td> </tr>\[/code\]I don't want that within:\[code\]<tr id="my_div"></tr>\[/code\]I just have that there because I don't know what to do.
The following is where I want the rows to appear:\[code\]<tr id="my_div"></tr> \[/code\]Currently that produces new rows within a row. I don't want that. I only want a new row not in a row.When I click the + I want it to produce:\[code\] <tr> <td valign="middle"><strong>URL 2:</strong></td> <td><input name="url2" type="text" size="40" /></td> </tr>\[/code\]I don't want that within:\[code\]<tr id="my_div"></tr>\[/code\]I just have that there because I don't know what to do.