+ Start a Discussion
Rohit2006Rohit2006 

How to Show progressbar when query is running?PLS HELP

Dear All;
                     I have created one SControl using AJAX toolkit to fetch the data from salesforce database and to display it in tabular format.As soon as I select filters and click the show report button the query starts fetching data from the database.During the query run the page gets freezed.
                    Actually I want to show the progress bar when query is busy.I tried this using javascript timer,usuing table in marquee, and some ready made progressbars available on net; but each time whenquery starts running every progressbar stops its animation(Movement) as the whole page, freezes.
                    I even tried with using callback function.It oks well when I show progrss in a form of text(percentage).But for progressbar it fails as timer stops working.
                    Can anyone give me the solution with example because I tried all the options in my mind.
Small example with explaination will help me lot.
 
Thanks in advance
FinTechFinTech
Try this.

</script>
</head>
<body onload="initPage();">
<table width="100%">
<tr><td width="100%" align="center"><br><br><br>Please wait, records are being updated&hellip;<br><br>
<img src="/img/waiting_dots.gif" border="0" width=156 height=34></td></tr>
</table>
</body>
</html>

zachzach
Javascript is a client side process, so that's why when you have intensive javascript being processed it looks as if the screen has frozen.  The only way I've found that lets the user know what's going on is by updating the status bar.  Keep in mind this only works in IE (sort of works in Firefox and you'll see the updated status when you get the option to stop script or continue), and it creates more overhead so your scripts will run slower.

You might be able to figure something out by updating a status div on every loop but that would just create more overhead as well.

There's not a lot that can be done aside from the option stated above... Before you start the intensive javascript, show a "processing" div with a static image & hide it when the javascript is done.

-Zach
rohitmaratherohitmarathe

Hi friends;

                Thanks for your useful help.Actually I was showing the progressbar after the query command which is having callback function.Thai is why it was getting locked.But now I am showing it just before a query call in a sepaate window and now it is working fine.Thank u very much friends for your all kind help

Rohit

rohitmaratherohitmarathe

Hi friends;

                Thanks for your useful help.Actually I was showing the progressbar after the query command which was having callback function.That is why it was getting locked.But now I am showing it just before a query call in a sepaate window and now it is working fine.Thank u very much friends; for all your kind help

Rohit