Login | |
|
 |
Refreshing screen while client-side script in process - 12/19/2007 3:44:02 AM
|
|
 |
|
| |
haz33
Posts: 13
Score: 0
Joined: 12/19/2007
Status: offline
|
Hi, I am currently developing an application where the user edits a collection of rows in a table, each containing several fields (text boxes). One of the functions I allow the user to perform is to "bulk-populate" a bunch of rows' data with the click of a button. For, say, ten or so fields, the user can enter in values for those fields into text boxes at the top of the screen. Then by clicking a button, the application will automatically fill ALL of the rows in the table with that same data. The problem arises when there are a lot of rows. For example, if I want to bulk-populate 300 rows, with each row containing ten fields (text boxes), my client-side VBScript procedure has to update 3,000 text boxes.....obviously not a terribly quick process. Anyways, when the button is clicked in this situation, the browser "hangs" while the procedure populates each and every text box behind the scenes. Eventually, it completes, but the process can take 30 seconds or even longer. My question is this: Is there a way to refresh or flush the controls as they're being populated (keep in mind that this is a client-side subroutine)? I just want the user to recognize that the application is actually doing SOMETHING. Perhaps there's an even better solution that I haven't thought of yet. If anyone has any suggestions, I'd greatly appreciate it. Thanks!
|
|
| |
|
|
|
 |
RE: Refreshing screen while client-side script in process - 12/19/2007 4:02:45 AM
|
|
 |
|
| |
ebgreen
Posts: 5250
Score: 31
Joined: 7/12/2005
Status: offline
|
There are lots of examples of IE progress bars that don't need you to do anything to update them. You can use one that you control the updates for (there are lots of examples of those too).
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: Refreshing screen while client-side script in process - 12/19/2007 4:32:58 AM
|
|
 |
|
| |
ebgreen
Posts: 5250
Score: 31
Joined: 7/12/2005
Status: offline
|
Aaah, the ones that you don't update are really faux progress bars. They are the kind that just have some blob move from one side to the other repeatedly (I'm sure you've seen this before). They exist just to let the user know that something is happening not necessarily accurately indicate how much is going to happen or how much has already happened.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: Refreshing screen while client-side script in process - 12/19/2007 4:52:28 AM
|
|
 |
|
| |
ebgreen
Posts: 5250
Score: 31
Joined: 7/12/2005
Status: offline
|
Oh, the rows are being updated with server side code? In that case I think a Faux progress bar kicked off by the client page would be your only option. It is entirely possible that I am wrong however since I don't do web/server side scripting.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: Refreshing screen while client-side script in process - 12/19/2007 6:26:48 AM
|
|
 |
|
| |
TNO
Posts: 1400
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
|
Here's one I did from about a year ago: http://www.visualbasicscript.com/m_41561/tm.htm
_____________________________
To iterate is human, to recurse divine. -- L. Peter Deutsch
|
|
| |
|
|
|
 |
RE: Refreshing screen while client-side script in process - 12/19/2007 10:25:31 AM
|
|
 |
|
| |
Fredledingue
Posts: 383
Score: 0
Joined: 5/9/2005
From:
Status: offline
|
IMO, instead of populating all the fields one by one, it would be faster (lasting maybe a 1/4 of a second instead of half a minute) to load the html code into a string variable, operating a string replacement to insert the new default value, then replace the html code inside the form. UserStr being the data to be duplicated among all the input boxes. MyFormHtml = Replace(document.form.innerHtml, "value=""""", "value=""" & UserStr & """""") document.form.innerHtml = MyFormHtml or even shorter: document.form.innerHtml = Replace(document.form.innerHtml, "value=""""", "value=""" & UserStr & """""") Make sure that value=""" is present in the original code, eg: <input type="text" name="Mydata" size="10" value=""> otherwise it won't find the string to replace.
< Message edited by Fredledingue -- 12/19/2007 10:28:01 AM >
_____________________________
Fred
|
|
| |
|
|
|
 |
RE: Refreshing screen while client-side script in process - 12/20/2007 8:52:32 AM
|
|
 |
|
| |
TNO
Posts: 1400
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
|
showModelessDialog("progress.html",self,"dialogHeight: 200px; dialogWidth: 400px; edge: Raised; center: Yes; help: No; resizable: No; status: No; unadorned: yes;"); MAKE SURE PROGRESS.HTML CAN CLOSE ITSELF or add a close button to the program manually. Remember, this will only work if you program is run from a trusted html page, or an HTA
_____________________________
To iterate is human, to recurse divine. -- L. Peter Deutsch
|
|
| |
|
|
|
|
|