codice:if($aggiorna and $lotto){ $z=1; while ($row_lotto=mysql_fetch_array($result_lotto)){ echo "<tr id=lotto$z><input type=\"hidden\" name=\"lotto$row_lotto[numero]\" value=\"$row_lotto[numero]\"> <td>$row_lotto[numero]</td> <td><input type=\"text\" size=\"12\" id=\"prezzo_base$row_lotto[numero]\" name=\"prezzo_base$row_lotto[numero]\" value=\"$row_lotto[pr_base]\" $disabled></td> <td><input type=\"text\" size=\"12\" id=\"rilancio$row_lotto[numero]\" name=\"rilancio$row_lotto[numero]\" value=\"$row_lotto[pr_rilancio]\" $disabled></td> <td>"; echo comboComune("lotto$z",$row_lotto['comune'],$disabled); echo "</td> <td><input type=\"text\" id=\"indirizzo_lotto$row_lotto[numero]\" name=\"indirizzo_lotto$row_lotto[numero]\" value=\"$row_lotto[via]\" $disabled></td> <td><textarea name=\"descrizione$row_lotto[numero]\" cols=40 rows=3 $disabled>$row_lotto[descrizione]</textarea></td> <td><input type=\"radio\" name=\"vendita_lotto$row_lotto[numero]\" value=\"0\" checked $disabled>No <input type=\"radio\" name=\"vendita_lotto$z\" value=\"1\""; if ($row_lotto['venduto']==1) echo "checked"; echo " $disabled>Si <input type=button value=Prezzo onclick=\"javascript:autoPopup($z,event);\"></td>"; $z++; } } else{ echo "<tr id=lotto1><input type=\"hidden\" name=\"id_lotto1\" id=\"id_lotto1\" value=\"0\"> <input type=\"hidden\" name=\"pr_vendita1\" id=\"pr_vendita1\" value=\"0\"> <td id=\"num_lotto1\">1.</td> <td><input type=\"text\" size=\"12\" id=\"prezzo_base1\" name=\"prezzo_base1\" $disabled></td> <td><input type=\"text\" size=\"12\" id=\"rilancio1\" name=\"rilancio1\" $disabled></td> <td>"; echo comboComune("lotto1","0", $disabled); echo "</td> <td><input type=\"text\" id=\"indirizzo_lotto1\" name=\"indirizzo_lotto1\" $disabled></td> <td><textarea name=\"descrizione1\" cols=40 rows=3 $disabled></textarea></td> <td><input type=\"radio\" name=\"vendita_lotto1\" value=\"0\" checked $disabled>No <input type=\"radio\" name=\"vendita_lotto1\" value=\"1\" $disabled>Si <input type=button value=Prezzo onclick=\"javascript:autoPopup(1,event);\"></td>"; }ok cosi dovrebbe essere giusto confermi???codice:function addLotto(id){ var tbody = document.getElementById (id).getElementsByTagName("TBODY")[0]; var lotto=document.getElementById("lotto1"); var newRiga=lotto.cloneNode(true); numLotti++; //alert(numLotti); updateAttributes(newRiga,'id',numLotti); newRiga.getElementsByTagName('b')[0].firstChild.nodeValue=numLotti+'.'; tbody.appendChild(newRiga); } function updateAttributes(node,attr,newNum){ if(node.hasChildNodes){ for(var k=0;k<node.childNodes.length;k++){ updateAttributes(node.childNodes[k],attr,newNum); } } if(node[attr]){ node.setAttribute(attr,node[attr].replace(/[0-9]+/,newNum)); } }
cmq 6 un grande
grazie mille

Rispondi quotando