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!

How to put progress bar in a new window?

Status
Not open for further replies.

ashpassword

Programmer
Jun 19, 2002
19
IN
I am opening a new window where I want to show a progress bar before showing my document as it tales some time to generate, so how could I achieve this.
As I am opening anew window as follows:

window.open(URL,"","menubar=yes,resizable=yes,toolbar=no,status=no,hotkeys=no,titlebar=no,scrollbars=yes,height=500,width=750");

and I want to put this to show progress bar:


document.open();
document.write('<BR><BR><LABEL style=&quot;font-family:Arial;font-size:11px;font-weight:lighter&quot;>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generating&nbsp;Report...<BR><BR></LABEL>&nbsp;&nbsp;&nbsp;&nbsp;<img src=&quot;progressbar.gif&quot; width=&quot;135&quot; style=&quot;border-width:1px; color:#3366aa; border-style:solid&quot;></img><CENTER><BR<BR>');
document.close();

 
Change it to this:

var new_win = window.open(URL,&quot;&quot;,&quot;menubar=yes,resizable=yes,toolbar=no,status=no,hotkeys=no,titlebar=no,scrollbars=yes,height=500,width=750&quot;);

new_win.document.write('<BR><BR><LABEL style=&quot;font-family:Arial;font-size:11px;font-weight:lighter&quot;> Generating Report...<BR><BR></LABEL> <img src=&quot;progressbar.gif&quot; width=&quot;135&quot; style=&quot;border-width:1px; color:#3366aa; border-style:solid&quot;></img><CENTER><BR<BR>');


Rick If I have helped you just click the first link below to let me know :)
 
Create a new function:

function something() {
popupWin = window.open(URL,&quot;&quot;,&quot;menubar=yes, ... );
popupWin.document.open();
popupWin.document.write('<BR><BR> ...');
popupWin.document.close();
}

I've made dozens like that and it always works excellent.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top