Daz wrote:
Quote:
Peter Michaux wrote:
> Quote:
Hi Daz,
Daz wrote: Quote:
Hello everyone. I have a simple problem which can be solved quite
simply, I am just going about it the wrong way. I would like to wipe
every row from within a named table, but I am not too sure how to do
it.
| Can you post a complete example (HTML with JavaScript in head element)
in 30 lines or less that shows how you are trying to do this?
Peter
| >
Hi Peter. I'm not entirely sure. The class itself is about 250 lines,
as it creates a LOT of DOM elements on-the-fly. Would you like me to
try and summerise it?
>
Everything works in the code, I just cannot seem to remove or unbind
the elements once they have been added to the table. Once again, I know
this is possible, I just don't know any methods to achieve this, and
those I have tried have failed.
|
Ok, I have an update to my previous post. I am using the Web Developer
Extension for Firefox, and I have spotted something rather odd. As I
mentioned before, my objects are created within a table row, and bind
to a hard-coded table in my document. I have enabled table and cell
outlining with the Web Developer Extension, and the table for that my
objects are bound to is outlines, as are the newly appended rows.
However, the old rows are non-existent (which is a good thing), but the
new rows are inserted from the point where the last rows ended. So I
have a blank section at the top of my table. Each time I press the
submit button to make the calculations, delete the right elements and
then make new objects and append them to the table, the new objects are
always inserted at the point where the old objects ended before they
were deleted.
Basically, Each time I press the submit button, the old
objects/elements are cleared, but the new ones are shifted down the
table. If I push the submit button three times, the new rows disappear
from the bottom of the page...