benkasminbullock@gmail.com a écrit :
>> <URL:http://developer.mozilla.org/en/docs/Gecko_DOM_Reference:Examples#Exa...
>
> Incidentally it says on the web pages that only IE needs to have the
> elements added to tbody, but in fact Firefox was adding some extra
> space at the top of the table every time I recreated it
With the above example my Firefox add no space ...
(or it is very very very small ?)

Signature
sm
benkasminbullock@gmail.com - 31 Oct 2007 08:46 GMT
On Oct 28, 2:04 am, SAM <stephanemoriaux.NoAd...@wanadoo.fr.invalid>
wrote:
> benkasminbull...@gmail.com a ?crit :
>
[quoted text clipped - 6 lines]
> With the above example my Firefox add no space ...
> (or it is very very very small ?)
I'm sorry to have confused you.
This problem is only visible upon deleting the rows and then re-adding
them. My example script doesn't do that, so the problem is not visible
here.
On Oct 26, 5:07 pm, "benkasminbull...@gmail.com"
<benkasminbull...@gmail.com> wrote:
> > > Can anyone explain why this does not work, and is there a way to make
> > > it work with Internet Explorer?
[quoted text clipped - 18 lines]
> bug which drove me to test it with Internet Explorer in the first
> place. Putting the elements onto <tbody> stopped the Firefox problem.
On Oct 26, 5:07 pm, "benkasminbull...@gmail.com"
<benkasminbull...@gmail.com> wrote:
> > > Can anyone explain why this does not work, and is there a way to make
> > > it work with Internet Explorer?
[quoted text clipped - 15 lines]
> Incidentally it says on the web pages that only IE needs to have the
> elements added to tbody,
It doesn't say "only", however IE is the only browser I'm aware of
that requires new rows added using appendChild to be appended to a
tableSection element (e.g. tbody), other browsers I've tested are OK
with appending to the table element. I presume that this behaviour is
because the tbody tags are not required and hence rarely used,
although the tbody element is mandatory. Browsers insert a tbody
where required even if there are no tags - similarly some DOMs allow
appending rows to the table and assume that they should be appended to
a tbody.
Both behaviours are OK, they are just different.
> but in fact Firefox was adding some extra
> space at the top of the table every time I recreated it which was the
> bug which drove me to test it with Internet Explorer in the first
> place. Putting the elements onto <tbody> stopped the Firefox problem.
I can't comment about the whitespace, nothing you've posted indicates
that it should occur.
--
Rob
benkasminbullock@gmail.com - 31 Oct 2007 08:45 GMT
> On Oct 26, 5:07 pm, "benkasminbull...@gmail.com"
>
[quoted text clipped - 39 lines]
> I can't comment about the whitespace, nothing you've posted indicates
> that it should occur.
The tables in the original application (not the example I posted) have
about eighty entries, and each time the table entries were deleted and
recreated using the original script, which goes like this:
function clear(obj)
{
while(obj.hasChildNodes()) {
obj.removeChild(obj.lastChild);
}
}
<some lines>
clear(document.getElementById("resultsField"));
about two or three centimetres of screen space was added to the top of
the table. If you're really interested in this issue I'll try to make
a script which replicates it. As I mentioned, you also need to delete
all the rows and put them back, which is a function I didn't add to
the example script. But the problem disappeared when I added the
things to tbody, so it's academic as far as I'm concerned. Thanks for
your help.