ciao a tutti,ho questa funzione javascript per aggiungere dinamicamente delle righe:
codice:
var cntRows=1;
function AddRow() {
	cntRows++
	var cell=cntRows
	var newcell="<input type=\"text\" name=\"riga"+"\" size=\"7\" value=\""+cell+"\">"
	var newcell1=""
	var newcell2var newcell2="<input type=\"text\" name=\"Articolo"+"\" size=\"20\">"			        
	var newcell3=""
	var newcell4="<input type=\"text\" name=\"qnt"+"\" size=\"10\">"
	var newcell5=""
	var newcell6="<input type=\"text\" name=\"prezzoU"+"\" size=\"10\">"
	var newcell7=""
	var newcell8="<input type=\"text\" name=\"prezzoT"+"\" size=\"10\">"
	var newcell9=""
	var newcell10="<input type=\"button\" name=\"B2"+"\" size=\"20\"  value=\"Inserisci Riga\" onclick=\"AddRow()\">"
	var newcell11=""
	var newcell12="<input type=\"button\" name=\"B3"+"\" size=\"20\" value=\"Elimina Riga\" onclick=\"DelRow()\">"			
		
	table.insertRow()
	table.rows(table.rows.length-1).insertCell()
	table.cells(table.cells.length-1).innerHTML=newcell
	table.rows(table.rows.length-1).insertCell()
	table.cells(table.cells.length-1).innerHTML=newcell1
	table.rows(table.rows.length-1).insertCell()
	table.cells(table.cells.length-1).innerHTML=newcell2
	table.rows(table.rows.length-1).insertCell()
	table.cells(table.cells.length-1).innerHTML=newcell3
	table.rows(table.rows.length-1).insertCell()
	table.cells(table.cells.length-1).innerHTML=newcell4
	table.rows(table.rows.length-1).insertCell()
	table.cells(table.cells.length-1).innerHTML=newcell5
	table.rows(table.rows.length-1).insertCell()
	table.cells(table.cells.length-1).innerHTML=newcell6
	table.rows(table.rows.length-1).insertCell()
	table.cells(table.cells.length-1).innerHTML=newcell7
	table.rows(table.rows.length-1).insertCell()
	table.cells(table.cells.length-1).innerHTML=newcell8
	table.rows(table.rows.length-1).insertCell()
	table.cells(table.cells.length-1).innerHTML=newcell9
	table.rows(table.rows.length-1).insertCell()
	table.cells(table.cells.length-1).innerHTML=newcell10
	table.rows(table.rows.length-1).insertCell()
	table.cells(table.cells.length-1).innerHTML=newcell11
	table.rows(table.rows.length-1).insertCell()
	table.cells(table.cells.length-1).innerHTML=newcell12
}
al posto di una text devo però mettere una select, che nel codice asp è:
codice:
<select size="1" name="Articolo" onchange="document.frmRicerca.prezzoU.value=articoloSelezionato(this);">
	<option value=""></option>
<%
                do while not objRsProd.EOF
%>
	<option value="<%=objRsProd.fields("Code") & ";" & objRsProd.fields("RetailPrice")%>"><%= objRsProd.fields("Description") %></option>
<%	
                objRsProd.movenext 
                loop
	
	objRsProd.close
	objConn.close
%>
</select>
come posso fare??