Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Progress Page

Status
Not open for further replies.

Elegabalus

Programmer
Jan 13, 2005
71
CA
I have a question about the Dynamic Progress Page done here:
The script basically creates a table with a background color, and javascript increases the width of the table to create the effect of a progress bar. It works great in IE.

However, I can't seem to make it work in Firefox. The issue seems to be that Firefox does not display table cells without any content in them. So does anyone know how I can insert a non-breaking space into the cells so that Firefox displays the table?
 
The script worked for me in Firefox when I commented out this line:

window.location.href = "<%= Request.QueryString["destPage"]%>";

The script was sending me to the new page before it ever started running the progress indicator. Apart from that, the script works the same in IE and Firefox.



P.S. On another note, there is something that I did notice:
Inside of function UpdateIndicator, there are two lines:

indicator.style.width =curCtr*10 +"px";
and
indicator.style.width =0;

The correct way to code this according to the DOM standards is:
document.getElementById("indicator").style.width =curCtr*10 +"px";
and
document.getElementById("indicator").style.width =0;
 
Thanks a lot.

Once I changed the indicator.style.width to document.getElementById("indicator").style.width
and added a non-breaking space between the td tags, it worked in both browsers.

Must be the javascript engine in Firefox that doesn't like the indicator.style.width syntax.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top