Re: [webmin-devel] Virtualmin: Check_Config and Feature_Details : delayed table rendering

paddy <[email protected]>
Newsgroups gmane.comp.web.webmin.devel
Message-ID <[email protected]>
On Tue, Dec 07, 2004 at 08:02:47PM +0000, I wrote:
> Also, I'm peripherally aware of html techniques that
> enable population of a slow rendering table after the rest of the page,
> but I'd need to look up the implementation, and I've no idea whether
> such a technique would fit in well with webmin. 

Attached is a simple demonstration program using the technique I was
thinking about, which uses javascript.  I indebted to jotti, at whose
excellent 'online virus scan' I first noticed this technique:

http://virusscan.jotti.dhs.org/

Regards,
Paddy
delayed_table.cgi (text/plain, 689 B)
#!/usr/bin/perl

my @features=( 'larry', 'curly','mo' );

require './virtual-server-lib.pl';
&ui_print_header(undef, 'delayed table demo', "");

# handle non-javascript clients here :)

print "we render the top<p>\n";

print "we render the table:<p>\n";
print "<table border=1>\n";
for $f (@features) {
	print "<tr><td>$f</td><td><div id=$f>test</div></td></tr>\n";
	}
print "</table>\n";

print "we render the bottom<p>\n";
print "and then we populate the table ... <p>\n";

for $f (@features) {
	sleep(2);
	print "<script language=\"javascript\">";
	print "  document.getElementById('$f').innerHTML='hunky dory';";
	print "</script>\n";
	}

&ui_print_footer("", $text{'index_return'});
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.