473,466 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

progress bar

1 New Member
Hi,
here is the situation: I have an "export to excel button" on click of which i open a window that calls a servlet in an iframe tag.
in the javascript part, i have a method that creates a progress bar, and runs untill some value in session is made true..

The problem is, the session value is not changing as i am not refreshing my page.. :P..

can somebody suggest a way to develop a progress bar while the servlet generates the excel and renders it to the client??see my jsp code below

[HTML]<script type="text/javascript">
function progress()
{
var flg='<%=session.getValue("flag")%>';
var t;
if(flg == null)
{
alert("inside if");
intWidth = parseInt(document.getElementById("statusBar").styl e.width) + 1;
if(intWidth <= 400){
document.getElementById("statusBar").style.width = intWidth+"px";
}else{
document.getElementById("statusBar").style.width = 0;
}
t=setTimeout("progress()",1000);
}
else if(flg=="stop")
{
alert("inside else");
alert(document.getElementById("message1").value);
alert(document.getElementById("message2").value);
document.getElementById("message1").value = 'Finished...';
document.getElementById("message2").value = '';
clearTimeout(t);
<%session.removeAttribute("flag");%>
}
}
</script>

</head>
<body>

<div id="displayed">

</div>
<br/>
<div id="hidden" style="display: none;">
<p id="message1" style="font-size: 15pt; font-family: sans-serif; color:#fd6700; background:#fff;">
Loading...
</p>
<br/>

<div id="statusBar" style="
margin:0px;
padding: 0px;
width:0px;
height:10px;
background-color:#fd6700;
margin-top:0px;
text-align: left;
font-size: 0pt;"
></div>

<p id="message2">Please wait..Report is being generated</p>

</div>
</div>

</body>


<script>
document.getElementById('hidden').style.display='' ;
document.getElementById('displayed').style.display ='none';
progress();

</script>

<iframe src='<%=request.getContextPath()%>/com/tesco/sss/pns/reports/action/ReportLoadAction'/>[/HTML]
Dec 17 '07 #1
1 1315
acoder
16,027 Recognized Expert Moderator MVP
You could use the iframe to set the value. When it's loaded, you can stop the progress bar.
Dec 17 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: SpamProof | last post by:
I got an animated gif that is a barber pole spinning that I want to use as a progress bar. The problem is that is stops spinning (shows 1 frame) when my browser is processing a submited request...
7
by: Pepi Tonas | last post by:
I have a form that takes some time to load because it has to populate some Data. I was trying to display a form on top of it with an activity bar so that user can see that something's going on. ...
1
by: scorpion53061 | last post by:
this code came from cor and I think Armin authored it. I am trying to download an access database and track its progress. It is reading the size fo the file but I am unsure of how to get the...
8
by: Brian Henry | last post by:
I created a smooth progress bar with this code.. but if you update the values in a row quickly of it and watch it on screen it flickers... how would i change this to reduce the flickering?...
8
by: WhiteWizard | last post by:
I guess it's my turn to ASK a question ;) Briefly my problem: I am developing a Windows app that has several User Controls. On one of these controls, I am copying/processing some rather large...
1
by: daniel_xi | last post by:
Hi all, I am running a VS 2003 .NET project on my client machine (Win 2000 SP4, ..NET framework 1.1), running an ASP.NET application on a remote web server (Win 2000 Server, IIS 6.0, .NET...
15
by: eladla | last post by:
Hi! I am creating a composite control the does some of it`s own data access. I want to display a progress bar between the time the page is loaded and the control place holder is displayed and...
5
by: Aggelos | last post by:
Hello I am doing sevreral scripts like sending a newsletter that might take a while to finish first to prevent the browser from timing out and to keep the user informed of the process progress I...
1
by: Bob | last post by:
Hi, I am having trouble seeing how this bolts together. The UI starts a process which involves a long running database update. All Database activity is handled by a class called DT. DT has a...
0
by: jags_32 | last post by:
Hello We use MFG-PRO as our ERP system which in turn uses Progress databases. In the old version of SQL 2000, using DTS packages, we used to set the code page via command prompts and execute DTS...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.