Search DominoPower's 11,420 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
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.


« Previous  ·  1  ·  2  ·  3
Other articles you might like
Home > Internet Technologies > JavaScript (13 articles)
   Sorting your Domino views with JavaScript
   Using dynamically generated HTML to thwart spam email address harvesting
   Implementing dynamic drop-down menus using Domino and Internet Explorer
Home > Tips & Techniques (102 articles)
   More about Domino log files
   Why your log.nsf might not be purging properly
   A faster way to repair corrupted server files
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Five trends for 2010
Latest Lotus Headlines
New Notes/Domino Technotes published about Chile's extended daylight saving time
SnnT: How to prevent Google from listing your Sametime Server
How to send someone an email that shows your calendar availability
"The collection has become invalid"
More XPages onclick event weirdness...
Domino 8.5.1 Fix Pack 1 Interim Fix 1 (8.5.1 FP1 IF1) - DAOS Fixes
Domino Designer 8.5 Tip: Where Working Sets Are Stored
>> Read all the news
More from the ZATZ journals
Computing Unplugged: Make Mafia Wars an offer it can't refuse
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Removing an Office installation that doesn't want to go away
-- 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.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login