|
|
|
|
|
|
|
|
|
|
|
|
|
|
Give your Domino views life with DHTML (continued)
The toggle function is used to control the visibility of each description block. It does this by modifying the "display" property of each element as required. This function also alters the display property of the trigger object that calls the toggle function. This is a "nice to have" feature as it ensures that actions are only displayed to the user when they can be performed.
The final task is to add the triggers that will provide access to the "toggle" function. To achieve this I added the following Pass-Thru HTML to the $$ViewTemplateDefault form above the <table> tag added above.
<div id="hide" style="display:none">
<a href="javascript:toggle('off')">Collapse</a>
</div>
<div id="show" style="display:block">
<a href="javascript:toggle('on')">Expand</a>
</div>
|
The code above defines two "div" block elements. Each contains a link that calls the "toggle" function to expand and collapse the page contents as required. Note that when the form is loaded the "hide" block is hidden and the "show" block is visible.
Once again, we'll look at how the views look, this time in a browser. Figure E shows the collapsed look.
FIGURE E
 
The view is collapsed. Roll over picture for a larger image.
And, Figure F shows the expanded view.
FIGURE F
 
Now, the view is expanded. Roll over picture for a larger image.
Summary The steps described above demonstrate just how simple it is to emulate the Expand-All and Collapse-All Notes client features using client-side browser techniques when you have a view that is treated as HTML.
The technique used (with some enhancements) can also be used to get a handle on any other page element. Once you have a handle to an element, it's visibility and any other read/write property can be controlled to give your web pages that true dynamic touch.
Colin Neale is Notes consultant and author of C-Search, C-Search for Domino.Doc and the C-Search Mail Monitor. He can be reached at cneale@c-search-solutions.com or http://www.c-search-solutions.com.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done.
Native to Lotus Domino. The User Experience unseen for Lotus Domino.
Do more with less. Really.
See the possibilities Docova unleashes for Lotus Domino. |
-- Advertisement --
Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.
Register by December 31 to save $350. |
|
|
|
|
|
|
|
|
|
|