Refreshing a Document on the Web

I have a Notes database with a web front end. The database has a form action that runs an agent. The agent calls a Script Library. I find that when the Script Library updates a field on a document, the updated field value is not displayed even if the document is saved.

Here’s some background:

The document is defined by the agent and is then passed to the Script Library as follows:

Set doc = session.DocumentContext

Call TestScriptLibrary(doc)

The document’s form contains a computed ‘HTTP_Referer’ field to capture the URL of the document.

The Script Library updates a field, saves the document, and then displays the document by referring to the ‘HTTP_Referer’ field as follows:

Dim arg As String

arg = "window.top.document.frames

(1).location.href ='" + doc.HTTP_Referer(0)

  • “';”

Print “”

When the document is displayed, it does not show the updated field value. Since the ‘refresh’ method of the NotesUIDocument class is not an option, I’m interested in how else a document might be refreshed to display an updated field value on the web.

Thanks.

Subject: Refreshing a Document on the Web

If the URL doesn’t change it reloads the document (the content of the document) from the local cache of the client pc. So you just have to change the URL a little for example

doc.HTTP_Referer(0) + ‘&time=123456789&’

Better is the $$Return Field with something like:

“[/” + @webdbname + “/0/” + @Text(@DocumentUniqueID) + “?OpenDocument&time=” + DateTimeStamp+“]”

Where DateTimeStamp is a hidden filed (computed for display with: @Trim(@ReplaceSubstring( @Text(@Now) ; “:”:“.”:" " ; “” )) inside

It does the same job.