I have some code that allows me to use javascript to add rows to a result table. I basically setup the first row in a table, and then have an add row button that will duplicate the row. this works fine accept when I try to add a dropdown field that uses php to pull results. The row still adds when I click the button, but the php dropdown portion doesn't showup.
function addOpenResult() {
var openResults = document.getElementById("openResults");
var openResultsRow = openResults.insertRow(openResults.rows.length-1);
var col1html = "<td width='50'><input size='5' width='100' type='text' name='rsRD1' /></td>";
var col2html = "<td width='50'><input size='5' width='100' type='text' name='rsRD2' /></td>";
var col3html = "<td width='50'><input size='5' width='100' type='text' name='rsRD3' /></td>";
var col4html = "<td width='50'><input size='5' width='100' type='text' name='rsRD4' /></td>";
var col5html = "<td width='100'><input size='10' width='100' type='text' name='rsScore' /></td>";
var col6html = "<td width='200'><select name='playerID'><option selected>---- Select Player ---</option>" . <?php while ($trpRow=mysql_fetch_array($trpResult)) {extract($trpRow); echo '<option value=$playerID>$lastName, $firstName</option>' ;}?> . "</select></td>";
var col7html = "<td width='100'><input size='10' type='text' name='rsAmount' /></td>";
var col8html = "<td width='100'><input size='10' type='text' name='rsOtherWinnings' /></td>";
var col9html = "<td width='100'><input size='10' type='text' name='rsOtherValue' /><input type='hidden' name='catID' value='15'></td>";
var col1 = openResultsRow.insertCell(0); col1.innerHTML=col1html;
var col2 = openResultsRow.insertCell(1); col2.innerHTML=col2html;
var col3 = openResultsRow.insertCell(2); col3.innerHTML=col3html;
var col4 = openResultsRow.insertCell(3); col4.innerHTML=col4html;
var col5 = openResultsRow.insertCell(4); col5.innerHTML=col5html;
var col6 = openResultsRow.insertCell(5); col6.innerHTML=col6html;
var col7 = openResultsRow.insertCell(6); col7.innerHTML=col7html;
var col8 = openResultsRow.insertCell(7); col8.innerHTML=col8html;
var col9 = openResultsRow.insertCell(8); col9.innerHTML=col9html;
var col10 = openResultsRow.insertCell(9); col10.innerHTML=col10html;
}