How I can visualize a progression bar (in html, javascript or image) while an agent executes itself Web?

How I can visualize a progression bar (in html, javascript or image) while an agent executes itself Web?

For example:

  1. Display and create a search form and submit, this form execute an agent (a long time process)

  2. While execute the agent display form with image and text “Loading…” or “Processing…” and

  3. When the agent end return or print html results and display in new page.

Bye!

Alfredo

Madrid, Spain

Subject: How I can visualize a progression bar (in html, javascript or image) while an agent executes itself Web?

You can let the agent update some document with the progress info, and have a window update itself every 1 second to show a numerical/graphical progress bar according to the values on that document.

Subject: How I can visualize a progression bar (in html, javascript or image) while an agent executes itself Web?

The easiest way (IMHO) is to show a progressbar in an animated GIF that is centered on a page/form, and when You open the page/form, you call the agent in the onLoad event. When the agent is done You simply do a redirect to the resultpage.

In this way You minimize roundtrips to the server, but the downside is that You can’t get a progressbar that is directly connected to the agent to display the actual progress - it is simply an assumed progress.

hth

Subject: RE: How I can visualize a progression bar (in html, javascript or image) while an agent executes itself Web?

This is a possible solution:

1.I’ve a form with fields values and submit button

2.In the Webquerysave execute:

@Command([ToolsRunMacro]; “(wqsForm-RedirectTo)”)’

  1. The agent code is:

Sub Initialize

Dim session As New NotesSession

Dim db As NotesDatabase

Dim docContext As NotesDocument

Dim strParms As String



Set db = session.CurrentDatabase

Set docContext = session.DocumentContext



strParms = "&"

strParms = strParms + "TipoInforme=" + docContext.ReportsWizard_TipoInforme(0) + "&"

strParms = strParms + "HospitalNombre=" + docContext.ReportsWizard_HospitalNombre(0) + "&"

strParms = strParms + "HospitalCodigo=" + docContext.ReportsWizard_HospitalCodigo(0) + "&"

strParms = strParms + "FechaDesde=" + docContext.ReportsWizard_FechaDesde(0) + "&"

strParms = strParms + "FechaHasta=" + docContext.ReportsWizard_FechaHasta(0) + "&"

strParms = strParms + "AutoUpdate=" + docContext.ReportsWizard_AutoUpdate(0) + "&"

strParms = strParms + "OnLine=" + docContext.ReportsWizard_OnLine(0) + "&"

strParms = strParms + "UserName=" + docContext.ReportsWizard_UserName(0) + "&"



'Compose the document with params....

Print "[/" & db.filepath & "/redirect?openform"+strParms+"]"

End Sub

  1. The redirect form show a image “loading.gif” (simulate progress bar) and contains hidden fields with parms values

  2. onLoad event in this form execute ‘document.forms[0].submit()’ and the WebQuerySave call to ‘@Command([ToolsRunMacro]; “(wqsForm-GenerateReports)”)’

  3. This agent print the result page.

  4. It works!!!

Thanks Kenneth!!