Internet Explorer. Inserting HUGE html data to control innerHTML.

Discussion in 'Javascript' started by borisov.gleb@gmail.com, Jul 18, 2007.

  1. Guest

    wp.prototype.loadHtmlToCtrl = function (ctrl, html) {
    alert(1);
    ctrl.innerHTML = html;
    alert(2);
    }

    5-10 seconds between two alerts depends on string length. It's only IE
    bug. FF and Safari3 works fine.

    Maybe anyone knows how I can insert huge HTML data faster? (100-400Kb
    one time and 10-20Kb many times).

    Thanks for advice.
    All the best, Gleb M. Borisov.
     
    , Jul 18, 2007
    #1
    1. Advertising

  2. Guest

    On Jul 18, 7:00 pm, "David Mark" <> wrote:
    > <> wrote in message
    >
    > news:...
    >
    > > wp.prototype.loadHtmlToCtrl = function (ctrl, html) {
    > > alert(1);
    > > ctrl.innerHTML = html;
    > > alert(2);
    > > }

    >
    > > 5-10 seconds between two alerts depends on string length. It's only IE
    > > bug. FF and Safari3 works fine.

    >
    > What makes you think this is a bug? Sounds like a performance issue to me.
    >
    >
    >
    > > Maybe anyone knows how I can insert huge HTML data faster? (100-400Kb
    > > one time and 10-20Kb many times).

    >
    > That doesn't sound so HUGE. Perhaps it is the complexity and not the size
    > that is the problem?
    >
    > You can't get any faster than innerHTML. Do you have to insert the whole
    > thing at once or can you do it a little at a time? If you can break it up
    > into stages, you can use setInterval. It won't actually speed it up, but
    > will allow you to update a progress bar or something like that. You might
    > want to hide the containing element during the operation as you probably
    > don't want the user to interact with the partially rendered HTML.


    Now I'm trying to split content and insert it to element with some
    intervals via setTimeout.
    Anyway, thanks for reply.

    All the best, Gleb M. Borisov.
     
    , Jul 20, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ed Hauptman
    Replies:
    7
    Views:
    1,093
    Ed Hauptman
    Aug 7, 2009
  2. jonjon
    Replies:
    0
    Views:
    130
    jonjon
    Feb 12, 2004
  3. Jason
    Replies:
    3
    Views:
    139
    kaeli
    Apr 19, 2004
  4. Replies:
    0
    Views:
    147
  5. Phper
    Replies:
    10
    Views:
    406
    John G Harris
    Sep 14, 2009
Loading...

Share This Page