Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Modal progress window

$
0
0
Re: Modal progress window
Web Connection 5.0
Re: Modal progress window
04/16/2012
01:06:20 AM
3HB02DFOU Show this entire thread in new window
Gratar Image based on email address
From:
Luca
To:
Attachments:
None
Dear Rick,
I am studying your ProgressBar, but there is something I do not understand.
I have a long procedure in the Ok_click function. In this example I simulate operations with a FOR ENDFOR cycle, I run UpdateProgress 100 times while usually I would run UpdateProgress just one time for every block of long operations, so I could have about 10 runs of UpdateProgress tipically. However in this example I see the Progress on webpage showing "Waiting to get started", while I see Progress_counter incremented rightly in Session.oData.Vars.
Please what is wrong?

***************************************************************** DEFINE CLASS test_Page as WWC_WEBPAGE OF WWC_WEBPAGE_FILE ***************************************************************** EnableSessionState = .T. FUNCTION Ok_click() this.Startprocessing_callback FOR m.counter=1 TO 100 Session.SetSessionVar("Progress_Counter",TRANSFORM(m.counter)) ENDFOR this.Processcomplete_callback ENDFUNC ************************************************************************************************************ FUNCTION StartProcessing_Callback() *** Create a counter we can increment and store in Session Session.SetSessionVar("Progress_Counter","0") RETURN ENDFUNC ************************************************************************************************************ FUNCTION UpdateProgress_Callback(llCancel) lnCounter = VAL( Session.GetSessionVar("Progress_Counter") ) LOCAL loArgs as ProgressEventArgs loArgs = CREATEOBJECT("ProgressEventArgs") *** Parameters come back as literal strings only *** so we have to parse 'true' IF llCancel loArgs.Cancelled = .T. loArgs.Percent = lnCounter RETURN loArgs ENDIF *** Completed IF lnCounter >= 100 loArgs.Completed = .T. loArgs.Percent = 100 RETURN loArgs ENDIF loArgs.Percent = lnCounter RETURN loArgs ************************************************************************************************************ FUNCTION ProcessComplete_Callback() RETURN .T. ENDFUNC ENDDEFINE

Thank you very much

You can use the ProgressBar control that comes with the Web Control Framework:

http://www.west-wind.com/wconnect/webcontrols/progressBar.wcsx

in combination with a Modal Popup window...

http://www.west-wind.com/wconnect/webcontrols/ModalPopup.wcsx

+++ Rick ---

Does anybody know of a way to display a modal progress window? I don’t know anything about client-side scripting and can’t find any examples on the web that will work in a webconnect page.

The problem is that users get impatient while waiting for the postback from the server and create duplicate transactions. So I was thinking that I could lock the screen with an opaque modal window for a few seconds to give time for the transaction to process. The demo examples appear to display the modal dialog _after_ the postback, so that doesn’t help.

Thanks in advance,

Mark




Viewing all articles
Browse latest Browse all 10393

Trending Articles