Hi,
I have an ASP page with multiply dynamically created rows.Every row has a
certain row # from the moment it was created. Users should be able to
delete any row they choose, using the delete button next to each row.
First delete is working OK, but after first delete row numbering is
altered, so before the next delete I need to renumber the rows. I added
the renumber button which executes JavaScript function for renumbering the
rows, but I'd really like to do it without a button. Is there is a way to
trigger this renumber function in code?
Thanks a lot.
Sofya
P.S.
I tried:
- add renumber function to the delete button, after delete function
( onClick='deleteRow();renumberRows()')- don't work
- add renumber function to the body onLoad event
( <body onload = 'renumberRows()'>)- don't work
Also I don't need to renumber after user add another row just after delete.
The renumber function is simple:
function renumberRows()
{
document.forms[0].Renumber.value = 'yes' // hidden field
document.forms[0].submit();
}