Rieccomi con un altro problema...
dopo aver definito in html una tabella, tramite un bottone che mi chiama una funzione javascript creo dinamicamente le righe di questa tabella:
Codice:
numberRow=0;
function addHtmlTest() { ////// HTTP TEST //////
numberRow++;
tr[numberRow]=document.createElement('tr');
var td0=document.createElement('td');
var td1=document.createElement('td');
td1.setAttribute("id","tdID"+numberRow);
var td2=document.createElement('td');
var td3=document.createElement('td');
var td4=document.createElement('td');
var tdText0= document.createTextNode('HTTP-test'); // create the text that will go in the table cell
var address= document.createElement('select');
address.setAttribute("id",'addressHttp'); // id access
address.setAttribute("name",'addressHttp'+numberRow);
address.onchange= function(){AddRow(numberRow);}
il problema è che quando chiamo AddRow(numberRow) definita così:
Codice:
function AddRow(row){
alert(row);
}
vorrei che mi stampi il valore relativo alla riga in cui mi trovo e non all'ultimo valore preso da numberRow.