Re: better innerHTML

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Praveen said the following on 3/1/2006 1:49 AM:
Im looking for some better ideas,samples,documentation for doing the folowing.

I have 5 tabs in my asp page.Each contains a <span>.
Im doing clientside transform for filling the contents of the span, by changing the innerHTML of span.

My xsl is cached in the client side (xslt template/processor) which contains templates for all the span.
So for each span Im requesting the server(xmlhttp) for xml and doing a transform using the cached xsl and changing the innerHTML of the corresponding span.
This is fine as of now.


BUT I know that my transformed output is going to be huge and I read that changing innerHTML is not a proper way for doing this.
This hangs the browser for some seconds. I want to fill the tabs Asynchronous so that it wont hangs the browser.

This article:

<URL: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndude/html/dude100499.asp >

Covers innerHTML versus other methods. It deals with the creation of a table instead of plain HTML but the principle is the same.

spanRef.nodeValue is where you should start looking for some speed increases.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
.



Relevant Pages

  • better innerHTML
    ... I have 5 tabs in my asp page.Each contains a. ... Im doing clientside transform for filling the contents of the span, ...
    (microsoft.public.scripting.jscript)
  • focus after onchange event and regex test not working
    ... default text in the span. ... After entering the first e-mail address, the onchange event handler ... if I change innerHTML and focus calls to a separate function, ... font-size: .95em; ...
    (comp.lang.javascript)
  • RE: DHTML, Javascript and Pocket PC2003
    ... Using DIV tags and changing the innerHTML attribute. ... Using SPAN tags and changing the innerHTML attribute. ...
    (microsoft.public.pocketpc.developer)
  • Re: Problems with ASP.Net object and Javascript
    ... How do you set this in Javascript and does it carry over to the asp.net ... >> Try setting the innerText or innerHTML properties of the span. ... >>> Then I found out that the 'value' property on span does not display. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: FFT algoritms
    ... glen herrmannsfeldt wrote: ... They should also span the space as well as sines and cosines. ... Integer Cosine Transform. ...
    (comp.dsp)