Hi Ken,
yeah ProcedureSetup is not _usually_ the right place to embed anything.
In a windows program if you open say a browse procedure, then the procedure is "running" for the whole life of the browse. It's one procedure, called once. The code "stays inside" that procedure until the browse is closed.
In a web program it's quite different. In a web program the procedure is called (because Firefox or whatever made a request), it generates some HTML or whatever, sends that back to the browser, then finishes. The whole thing lasts for maybe a tenth of a second. If the user then does something else (click on a row or whatever) then a new request is made and the browse procedure is called again. It genreates a response and so on.
So while the user in Firefox is "seeing" the browse, there is nothing happening on the server. And everything they do something the browse procedure on the server is called again. The "life" of the browse may result in many many calls to the browse procedure.
Internally of course the browse procedure follows a different path depending on what the user is "requesting". In your case the top of the "Generate Browse" routine is likely to be a better place than "Procedure Setup" - but remember that even that can be called many times, when the user Pages, or changes the Sort order and so on.
cheers
Bruce