I have this code which displays a message in the status bar of the browser... after
each select is done the javascript is run and the message "now processing...." is displayed
in the status bar. This works great, but I would like to do the same thing, BUT have
the message ("now processing....") displayed on the page which is loaded. In other words,
the same message must be displayed, but in the middle of the page where it is more obvious
and prominent.
Can anyone help me with this please??
Thanks,
T
Code:
<tr>
<td width="50%" style="font-family: Arial " align="left"><select name="D16" size="1">
<option selected value="ACCESSORIES">ACCESSORIES</option>
<option value="1">First Item</option>
</select><script language="JavaScript" type="text/javascript">window.status='Now Processing Record: 1 OF 10'</script></td>
</tr>
<tr>
<td width="50%" style="font-family: Arial " align="left"><select name="D16" size="1">
<option selected value="ACCESSORIES">ACCESSORIES</option>
<option value="2">Second Item</option>
</select><script language="JavaScript" type="text/javascript">window.status='Now Processing Record: 2 OF 10'</script></td>
</tr>
<tr>
<td width="50%" style="font-family: Arial " align="left"><select name="D16" size="1">
<option selected value="ACCESSORIES">ACCESSORIES</option>
<option value="3">Third Item</option>
</select><script language="JavaScript" type="text/javascript">window.status='Now Processing Record: 3 OF 10'</script></td>
</tr>
//this is just to reset the status, so I display a blank line!!
<script language="JavaScript" type="text/javascript">window.status=''</script>
Just set Response.Buffer=False then put the progress message HTML before your long process. You can put code in the window_onload event that changes the message when the page fully loads (since the process will be done when that occurs).
Just put the message in a container tag like a DIV and give it a name.
Then in your code you can change the innerText property of the div.
oOOo--oOOo
__/\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP [email protected] [email protected] Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
The reason why I want some kind of a status / progress message is because I need to load 700+ records from my db into dropdown boxes. ALL I want to do is let the user know that the page is still being loaded ie..
"Please be patient - now processing record x of 700".
The reason why I want it displayed in the middle of the page is so that it is more obvious for the user to see.
Yes, you are right an ALERT / popup window will look VERY(!!) GROUSSSSY!!!!
a question,
is ACCESSORIES a variable ?
if no, then i suggest you read the data for all the Combo-boxes (or dropDown as u said) and store them in variables (arrays will be the best choice for each ComboBox).
if yes,
then just you could either display a "Please wait" message after executing each SQL statement and storing the data in vars..
("700 times" means you should use Stored Procedure for fast execution)
that message could even tell which DropDown menu out of 700 is in progress.
Finally,
when all SQL statements are finished; display the form with the input fields having initial values filled by the vars you just filled (procced).
ah uhumm, is it clear? hope i did not make it complex..
There's really no efficient way of doing exactly what your wanting to do. You can't give them a true x of 700 status because it is being processed on the server. You can, however display a message that is removed or changed once the page is loaded. (Or before by response.writing the javascript that hides it)
Think of a DIV is a big box you put your elements and text into. You can choose to display this box and it's contents or not. You can change the contents by naming it and using the name to access it's methods and properties just like you would any form element.
BTW- 700 records should not take a long time to load. 700 records is nothing.
Are you using ODBC drivers instead of an OLEDB provider? That will degrade your DB performance if you are.
oOOo--oOOo
__/\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP [email protected] [email protected] Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..