Search DominoPower's 11,974 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.
CATEGORIZED VIEWS
Building DHTML views with Internet Explorer
By Matt Holthe

One of the things I don't like about using categorized views from a browser is the fact that every time you expand or collapse a category, a request is made to the server. With the Java view applet, this round trip is eliminated, but there's an initial load time that must be accounted for. Plus, I have some customers who block external Java through their firewall, so the applet is not an answer.

Using DHTML, you can have a categorized view where the categories can be expanded and collapsed on the client, which solves both problems. In this two-part series of articles, we'll look at how it's done.

Obviously, to use this solution you'll need to use a version 4 or higher browser because they support DHTML. You'll also need to have JavaScript enabled. Since Internet Explorer and Netscape handle things differently, I chose to focus my attention on one browser for this series of articles. I chose Internet Explorer because there's some browser event handling which can make the DHTML solution pretty slick. In a widely-fielded solution, you should probably check the browser version and feed a lower resolution set of pages for older and non-enabled browsers.

DHTML overview
First, I'll give the two-minute overview on DHTML. All I'm looking for here is to be able to show and hide parts of the page selectively. To do this, you set a <DIV> tag (division) with a style of "display:none" to hide everything between the <DIV> and </DIV> tags. The absence of the "none" value means everything will be shown. So, we want to have all the category lines shown when the page loads, and all the document lines hidden. Then, when the twisty icon is clicked, we want to show the document lines under that category. Sounds pretty simple, right?

In this article, we'll start with a view with only one category. We'll add a second category in part two of this series. Set up a form with fields called Category1 and Subject. Both are text fields. Then create some documents that'll fall into a couple different categories. You can create a Notes view with the first column categorized on Category1 and the second column with a value of Subject just to see what things will look like.

Build the DHTML view
Now, let's build the DHTML view. First, set up the view (call it DHTMLView1) to have the view contents be HTML on Web access (the beanie tab). This means Domino won't generate any HTML for us, which is what we're going to want. Otherwise, Domino would put links in for each twisty, but we want those to be controlled on the client. Next, make sure that the setting for "collapse all when view is opened" (on the info tab) is not checked. Otherwise, all the rows in the view won't be sent to the browser, and we need them all sent.


1  ·  2  ·  3  ·  4  ·  Next »
Other articles you might like
Home > Internet Technologies > JavaScript (13 articles)
   Sorting your Domino views with JavaScript
   Give your Domino views life with DHTML
   Using dynamically generated HTML to thwart spam email address harvesting
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
Home > Internet Technologies > HTML and CSS (15 articles)
   Using a reusable code approach to HTML select option lists
   One reader's opinion on HTML mailing
   Keep lookin' good with Cascading Style Sheets
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
Lotus must open source Notes and Domino
It's time for Lotus to double-down on Linux and open source
Back to basics with Notes: what you can do now
Back to basics with Notes: what are the basics?
Back to basics with Notes
Smart Upgrade bug in Domino 8.5.1 (and some work-around tips)
Hands-on with XPages and the Lotus Solutions Catalog
Latest Lotus Headlines
IBM Lotus Notes 8.5.2: Upgrading your Icons from 16x16 to 32x32
IBM killed the Sandbox !
Followup on Cut and Paste problem in 8.5.2
Save us from our users: Doomsday Weekend 3
iNotes 8.5.2 Security Change With XSS
Warning about multiple Traveler installations in your domain
Admins: Modifying, Updating or Fixing your Config
>> Read all the news
More from the ZATZ journals
Computing Unplugged: Introducing the Jones family and their full-family backup challenges
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Hands on debugging a broken Outlook forwarding rule
-- Advertisement --

Navigate the Document 'SharOllaboraGement' Universe
More than 60% of organizations are dealing with 'Content Chaos' -- Out of control Documents and Content.

Unfortunately, over 50% of those will rush into the wrong solution and ultimately fail.

The Document & Content Management Decision Matrix is a free tool for navigating the broad 'Document Sharing, Collaboration and Management' technology universe.

Use it to help you make the right decision based on your organizational preferences and needs.

Tap to download this complementary tool.

-- Advertisement --

Want the top Lotus experts by your side without paying hefty consulting fees?
Look no further.

Like having a team of consultants by your side -- ones who have all the answers and never make mistakes -- THE VIEW gives you immediate access to field-tested instruction, guidance, and best practices from the brightest Lotus professionals around.

See the new instruction, advice, and best practices added to THE VIEW this week.

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login