swap column in a html table

I

Ivo

Martin Honnen said:

Quote from that page:
"Note that this simply shows how to do the column swap, I haven't tested
that with very large tables but I think it might be better to first hide
the table, then do all the cell swapping and later show the table again
to avoid that the browser has to adapt the table rendering each time a
cell is moved."

It is strange that such a good script should be followed by such ill advise.
Re-rendering is done only when the javascript has come to an end after
looping through all rows, so there is really no need to first hide the
table.
 
M

Martin Honnen

Ivo said:
Quote from that page:
"Note that this simply shows how to do the column swap, I haven't tested
that with very large tables but I think it might be better to first hide
the table, then do all the cell swapping and later show the table again
to avoid that the browser has to adapt the table rendering each time a
cell is moved."

It is strange that such a good script should be followed by such ill advise.
Re-rendering is done only when the javascript has come to an end after
looping through all rows, so there is really no need to first hide the
table.

Well I have written "might be better" and that I have not tested whether
it improves things. How do you know for sure that all browsers suspend
rerendering until script is done?
 
I

Ivo

Well I have written "might be better" and that I have not tested whether
it improves things. How do you know for sure that all browsers suspend
rerendering until script is done?

I don't. Who knows all browsers?
But the browsers that I do know work this way, regardless of table lengths.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top