Manage Learn to apply best practices and optimize your operations.

Web Document All Sections Collapse\ Expand & "Back " Button

How to provide the functionality for a user to Collapse All Sections ( or
expand all )in a Domino Document on the Web.

This has been tested with Notes Domino 4.57 and 4.62, using the following
browsers: IE 3,IE 5, and Netscape 4.08

When a document has multiple sections, users will want to be able to expand or
collapse all document sections on the web, comparable to what can be done in

ADDITIONALLY : When a user has been expanding and collapsing sections, it is
tedious for the user to have to press the BACK button several times to "exit"
the document and get back to the Main Page / Navigator for the site. I add a
"BACK" hotspot that contains the URL for the page the user wants to get to.
Collapsing Sections:

(For IE 3 and Netscape 4. X- you need to specify the path) Create a hidden
field at the top of your form - make it text, computed for Display.
In the example below, I have named the field Path_Info . Create a hotspot on
the form ( Create, Hotspot, Action Hotspot )that the Web user will click on to
initiate the collapse action. Paste the following code in the formula pane of
the hotspot:

HOTSPOT FORMULA for Collapsing Sections:
@URLOpen(@Left(@UpperCase( Path_Info); "?OPENDOCUMENT" ) +
"?OPENDOCUMENT&CollapseSection=1,2,3,4,5,6,7,8,9" )

HOTSPOT FORMULA for Expanding Sections:
@URLOpen(@Left(@UpperCase( Path_Info); "?OPENDOCUMENT" ) +
"?OPENDOCUMENT&ExpandSection=1,2,3,4,5,6,7,8,9" )

NOTE 1 : CollapseSection= 1,2, ....n) indicate the number of sections that will
be closed. In my example there were nine sections.

NOTE 2 : Domino treats a subform sections as if they are sections in a separate
document. So a subform at the bottom of the form is also treated as section 1.
I "worked around" this situation by removing the subform and putting the
section directly into the document.

Hotspot formula for "BACK"
(I use a control document in a "Control" view to store the actual URL info so
this can be changed by the db owner. This data was stored in a document with
the first column in the ControlDoc labled as "Go Back" : ) The database
properties of this database were set to launch a navigator on database open.


DBName := @DbLookup("":"NoCache"; "" : ""; "Control"; "Go Back"; 2);

Dig Deeper on Domino Resources - Part 5



  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/ community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury