Tip

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
Notes.

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" :
http://demo.web.ey.com/us/national/demo/welcome.nsf ) The database
properties of this database were set to launch a navigator on database open.

FORMULA :

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

This was first published in November 2000

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.