Results 1 to 12 of 12

Thread: Progress / Status message

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343

    Angry Progress / Status message

    Hello,

    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>

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343
    anyone!!??

  3. #3
    Lively Member harsoni's Avatar
    Join Date
    Oct 2000
    Posts
    118

    Lightbulb

    Hi,
    Well you can do like this, first create a DIV and place the message in the DIV and show and hide it...Hope it works..

    Sonia

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343
    Hello Sonia,

    Could you perhaps give me some example code on how to do this!!??

    thanks for your help,
    T

  5. #5
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    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.

    <DIV name=StatusMessage id=StatusMessage>
    Processing...
    </DIV>

    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..

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343
    Hello Monte96,

    I was hoping you would catch onto this thread!! Thanks for the reply, but I am still a bit lost - have never used <div> etc.

    Please can you give me a simple example of how this can work.

    Thanks,
    T

  7. #7
    New Member
    Join Date
    Jul 2001
    Location
    Saihat, Eastern Province, KSA
    Posts
    3
    I dont know what is your goal of the message being displayed at the middle of the window (page)!

    you can use the javascirpt ALERT so it displays an alert window to the user but this would be GROUSSSSSY!

    to use it just add to that code

    <script language="JavaScript" type="text/javascript">
    window.status='Now Processing Record: 2 OF 10';
    alert('Now Processing Record 2');
    return(true);
    </script>

    ciao
    Power is within you, use your mind

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343
    Hello,

    I cannot believe that this is so difficult....

    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!!!!

    T

  9. #9
    New Member
    Join Date
    Jul 2001
    Location
    Saihat, Eastern Province, KSA
    Posts
    3
    Well,
    so why dont i see the values taken from a record?
    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>
    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..
    Power is within you, use your mind

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343
    Eventually, I think I've got it!! Thank you very much for your help.

    T

  11. #11
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    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..

  12. #12
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    Check this code that I have. It is simple but it will present the user with a progress bar saying that the data is loading...
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width