Wrox Programmer Forums
|
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 17th, 2007, 02:46 AM
Registered User
 
Join Date: Jul 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to do progess bar

Hi this is my page which is used for uplading pictures. can i know how to put progress bar with % of completing staus in it.

<script language="javascript">
var ModalDialogWindow;
var ModalDialogInterval;
var ModalDialogEventHandler = '';

function ModalDialogMaintainFocus()
{
try
{
if (ModalDialogWindow.closed)
{
window.clearInterval(ModalDialogInterval);
eval(ModalDialogEventHandler);
return;
}
ModalDialogWindow.focus();
}
catch (everything) { }
}
function ModalDialogRemoveWatch()
{
ModalDialogEventHandler = '';
}
function ModalDialogShow(Title)
{
ModalDialogRemoveWatch();
ModalDialogEventHandler = ModalDialogRemoveWatch();

var args='width=350,height=150,left=325,top=300,toolba r=0,';
args+='location=0,status=0,menubar=0,scrollbars=0, resizable=0';

ModalDialogWindow=window.open("","",args);
ModalDialogWindow.document.open();
ModalDialogWindow.document.write('<html>');
ModalDialogWindow.document.write('<head>');
ModalDialogWindow.document.write('<title>' + Title + '</title>');
ModalDialogWindow.document.write("<" + "script language=javascript" + ">");
ModalDialogWindow.document.write("onerror=errhandl e;");
ModalDialogWindow.document.write("function errhandle() {return true}");

ModalDialogWindow.document.write('var ctr = 1; var ctrMax = 20; var intervalId;');
ModalDialogWindow.document.write('intervalId = window.setInterval("ctr=UpdateIndicator(ctr, ctrMax)", 600);');
ModalDialogWindow.document.write('function UpdateIndicator(curCtr, ctrMaxIterations) {');
ModalDialogWindow.document.write('/*alert(window.opener.document.form1.progress.value );*/if(window.opener.document.form1.progress){if (window.opener.document.form1.progress.value != "waiting" ) window.close();}else {window.close();}');
ModalDialogWindow.document.write('curCtr += 1;');
ModalDialogWindow.document.write('if (curCtr <= ctrMaxIterations) {');
ModalDialogWindow.document.write('indicator.style. width = curCtr*10 +"px";');
ModalDialogWindow.document.write('return curCtr;}');
ModalDialogWindow.document.write('else {indicator.style.width=0; return 1;}}');
ModalDialogWindow.document.write("<" + "/" + "script" + ">");
ModalDialogWindow.document.write('</head>');
ModalDialogWindow.document.write('<body onblur="window.focus();" margintop="0">');

ModalDialogWindow.document.write('<table border=0 width="95%" align=center cellspacing=0 cellpadding=2>');
ModalDialogWindow.document.write('<tr><td>');
ModalDialogWindow.document.write('<div align=center><h5>Please be patient. Image Uploads may take several minutes</h5></div>');
ModalDialogWindow.document.write('<table border="0" width="100%"><tr><td width="10%"></td><td width="80%">');

ModalDialogWindow.document.write('<table id=indicator border="0" cellpadding="0" cellspacing="0" width="0" height="20">');
ModalDialogWindow.document.write('<tr><td bgcolor="red" width="100%"></td></tr></table>');

ModalDialogWindow.document.write('</td><td width="10%"></td></tr></table>');
ModalDialogWindow.document.write('</td></tr>');

ModalDialogWindow.document.write('<tr><td align=center>');
ModalDialogWindow.document.write('<a href=javascript:window.close();>Close</a> ');
ModalDialogWindow.document.write('</td></tr>');
ModalDialogWindow.document.write('</table>');
ModalDialogWindow.document.write('</body>');
ModalDialogWindow.document.write('</html>');
ModalDialogWindow.document.close();
ModalDialogWindow.focus();
ModalDialogInterval = window.setInterval("ModalDialogMaintainFocus()",5) ;
}

function ShowPopup()
{
document.form1.progress.value = "waiting";
ModalDialogShow("Processing your request ...");
return true;
}
</script>

 
Old July 18th, 2007, 09:48 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Maybe this thread will help you: http://p2p.wrox.com/topic.asp?TOPIC_ID=62179

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Status Bar ironchef Java GUI 0 October 26th, 2006 09:19 PM
Sroll bar JelfMaria VB How-To 1 May 11th, 2005 10:38 PM
How do disable Menu bar & address bar for browser bekim HTML Code Clinic 2 January 7th, 2005 12:33 AM
How to trap Mouse events on Title bar/Caption bar chiefouko Pro VB.NET 2002/2003 0 September 21st, 2004 02:42 AM
Bar Chart with Item names beside bar jmurdock BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 July 23rd, 2004 01:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.