What you might want to try is to put each snippet of HTML into an
array and return a join() at the end of the looping; as in

for (i = 0; i < sourceArray.length; ++i){
  newArray[i] = '<tr>';
  for (var j in this.records[i]) {
    newArray[i] += '<td>' + this.records[i][j] + '</td>'
    };
 newArray[i] += '</tr>'
};
txt = newArray[i].join('\n');

/// ORIGINAL 
If it's really the looping that's wasting the time, not the 
rendering, you
could try using a setTimeout, instead of a for-loop. This is because 
every
time a setTimeout loops, it gives other processes a chance to do 
their
thing, while a for loop will run it's whole course, before letting 
other
tasks pick up, this might cause a white screen, or apparent freeze, 
while
waiting.
I haven't tested this with a large array, but you could try:

var txt='<table>'
var i=0

function makeTable(){
     txt += '<tr>'
          for (var j in this.records[i])
          txt += '<td>' + this.records[i][j] + '</td>'
     txt += '</tr>'
     if(i<this.records.length){
        i++
        setTimeout('makeTable()',0)
    }
}
txt+='</table>'
makeTable()


=====
=======================
'Providing year 2001 consultations at rates as low as $5,000 an hour.'
Dave Edelhart
Director of Operations, Manatee Bay Productions
www.manateebay.com    
[EMAIL PROTECTED]

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to