- This topic is empty.
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › Add row / autocomplete Problem
Hi there.
I ‘m making an invoice with the Editable Invoice who crhis make.
now I add the autocomplete script, work fine with the first row, wich is written in the html,
now with the addrow link, lose all functionality, no autocomplete and no autocalculate the total,
please check it out, and post some ideas
the link : http://www.cuboidea.com/invoice/index.p … ERNACIONAL
I think is for the bind()
try it to change to live, but "" .live(‘after’,function(){ "" is NOT correct, right, or could it be… ‘cos live work with event, click dblclick … not with after
//code
$("#addrow").live(‘click’,function(){
// HERE $(".item-row:last").live(after, function(){(‘<tr ????????????????????
$(".item-row:last").after(‘<tr class="item-row"><td class="item-name"><div class="delete-wpr"><a class="delete" href="javascript:;" title="Quitar Artículo">Borrar</a><textarea id="articulo" class="articulo" onclick="this.focus();this.select()"></textarea></div></td><td class="description"><textarea class="description" onclick="this.focus();this.select()">Descripción</textarea></td><td class="valorunitario"><textarea class="cost" readonly="readonly">$0</textarea></td><td><textarea class="qty" onclick="this.focus();this.select()"></textarea></td><td><span class="price">$0</span></td></tr>’);
if ($(".delete").length > 0) $(".delete").show();
bind(); //HERE live() ???
});
bind(); // HERE live() ????
$(".delete").live(‘click’,function(){
$(this).parents(‘.item-row’).remove();
update_total();
if ($(".delete").length < 2) $(".delete").hide();
});
//code