[SOLVED] append table

[SOLVED] append table

Hi... I have a problem like this..
I create a function to append a new <tr> whenever I click a button.. the code is like this..

function addRow() {
var no = $("#row").val();
if(no == '') no = 1
else no = parseInt($("#row").val()) + 1;
var row = '<tr>'+
'<td align="center"><input type="checkbox" id="chek'+no+'"></td>'+
'<td><span name="no'+no+'" id="no'+no+'">'+no+'</span></td>'+
'<td><input type="text" style="width:95%" name="prodName'+no+'" id="prodName'+no+'"></td>'+
'<td><input type="text" size="5" name="qty'+no+'" id="qty'+no+'" class="curForm" value="'+(no*1000)+'"></td>'+
'<td><input type="text" size="15" name="price'+no+'" id="price'+no+'" class="curForm"></td>'+
'<td><input type="text" size="1" maxlength="3" name="disc'+no+'" id="disc'+no+'" class="curForm"></td>'+
'<td><input type="text" name="sub'+no+'" id="sub'+no+'" class="curForm"></td>'+
'</tr>';
$("#tab > tbody:last").append(row);
$("#row").val(no);
}

then I call it using this

$("#add").click(function() { addRow();});

in several <input> there is a css class named "curForm".. The problem is.. I want to initiate an action using curForm, but it doesn't work.. the code is like this

$(".curForm").blur(function() {
showFormatCurrency(this.id,this.value);
var idName = this.id.replace(/[1-9]/g,'');
var no = this.id.replace(/[a-z]/g,'');

if(idName == "price" || idName == "disc") {
subTotal = parseFloat($("#qty"+no).val().replace(/\,/g,'')) * parseFloat($("#price"+no).val().replace(/\,/g,''));
if($("#disc"+no).val() != '')
disc = parseFloat($("#qty"+no).val().replace(/\,/g,'')) * parseFloat($("#price"+no).val().replace(/\,/g,'')) * (parseFloat($("#disc"+no).val().replace(/\,/g,'')) / 100);
else disc = 0;
showFormatCurrency("sub"+no,parseFloat(subTotal)-parseFloat(disc));
}
});
$(".curForm").focus(function() {
if($("#"+this.id).val() != '')
$("#"+this.id).val($("#"+this.id).val().replace(/\,/g,''));
});

If I call addRow() when the page load, the $(".curForm") action work perfectly, but not if I call addRow() from $("#add")

Please help me.... thanks ^^