/    Sign up×
Community /Pin to ProfileBookmark

Appending tables.

Hi,

I need to append a table (~1000 rows) that was received by AJAX call to an existing table.
Appending row by row is very slow in IE.
Is it possible to do that in IE?

I know FF can do that by appending child to an existing table. IE throws exception.

Thanx,

Ronen

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@mrhooMar 19.2007 — 
  • 1. set the width of each column or colgroup with the 1rst row of cells.

    If you do not do this, IE will redraw the whole table every time itdraws a cell.


  • 2. add groups of rows to the table element using tbodies or documentFragments to tbody.
  • Copy linkTweet thisAlerts:
    @ronenauthorMar 19.2007 — mrhoo, thanx for the replay,

    can you add a small script describing how to convert responseXML.documentElement to a DOM tabe?

    My responseXML.documentElement contains:
    [CODE]<tbody>
    <tr><td></td><td></td></tr>
    <tr><td></td><td></td></tr>
    ...
    ...
    <tr><td></td><td></td></tr>
    </tbody>[/CODE]


    and i need to appand it to

    [CODE]<table id='tb1' border="1" bgcolor="#00ffff">
    <tbody id='tbl1'>
    <td>1</td><td>2</td><td>3</td><td>4</td><td>5</td>
    </tbody>
    </table>[/CODE]


    how can I use documentFragments or append bodies?
    ×

    Success!

    Help @ronen spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.24,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...