Feedback on: irt.org FAQ Knowledge Base Q5826
Worth:
Very worth reading
Comments:
One comment and one enhancement:
1. The sample code has an unfortunate line break in the window.open line that causes the code to fail and while the sample has </head> and <body> tags, it does not have <html>,<head>,</body> or </html> tags.
2. Try these changes for a real "bar":
var w=2
function inccounter(runOnce) {
if (runOnce == 1) {
myFloater.document.write ("<font face='Verdana' size = 3> LOADING:</font><br>");
myFloater.document.write ("<form name=frm><INPUT TYPE=text WIDTH=2 NAME=box></FORM>");
}
else {
//myFloater.document.write ("<font face='Verdana' size = 2>*</font>");
w = w + 2
myFloater.frm.box.width = w
}
}
Worth:
Very worth reading
Comments:
How would you write the script if you didn't know how long it would take for the page to load. THis answer assumes that it takes 700 counts for the page to load. Is there a keyword or something that would know how long it takes exactly for the page to load instead of hardcoding it?
Technical:
Not technical enough
Comments:
This code example will only work if you do not have buffering turned on in your web server.
<br><br>
If you have buffring turned on then all of the code will be written to the browser at one time: only when the WHOLE page has been rendered on the server.