Search DominoPower's 11,323 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.
PROGRAMMING POWER
Great scripts for discussion forums
By Kevin Hoffman

I work for a large corporation with many talented individuals. Some of the most talented are in our "Corporate Development" group. They made a commitment to develop a new knowledge management system with a focus on employee contribution and participation. Best of all, they have a lot of money.

So, in addition to taking advantage of our Lotus Domino infrastructure I could take time to find unique solutions to their business needs that Domino's basic feature set didn't quite meet. This article describes some of the methods I employed to meet my clients requirements.

If you read through it carefully, you'll get a number of great ideas for scripting discussion forums.

Fun with JavaScripted frames
Many developers have already seen the JavaScript trick of using two frames to aid navigation around a view. If not, simply stated you create one frame with links which are actually JavaScript pointers to links in the second frame. The links in the second frame actually have the Domino-generated code to navigate to the next or previous set of documents. Unfortunately, this trick breaks down when you attempt to extend the concept to switch between collapsible and flat views, from view to document or when viewing documents.

Another approach is to create a context sensitive navigation frame. This is a frame with navigation links where the links change based on the content of the page being viewed in the main frame. You can do this with a simple line of JavaScript code written in the HTML of the document in the main frame:

<SCRIPT>
parent.frames[2].location.replace("/Idea.nsf/vHTML/DefaultNavigator?OpenDocument");
</SCRIPT>

This simple yet powerful code replaces your navigation frame with a page containing the appropriate JavaScript code for the document or view being browsed in the main frame. You can place this line of code in documents, forms, view templates, agent generated HTML--basically just about anywhere.

This solution is flexible enough to handle almost every navigational situation. For example, when the user navigates to the next document in a view but is already at the last document, the view itself is displayed. When the view is generated, the browser evaluates this line of code and replaces the navigation frame with the appropriate navigation document. When the user switches from a collapsible view to a flat view, the "Expand" and "Collapse" links disappear from the navigation frame. If the user is reading a document in a discussion area, he can create a response document by clicking a "Respond" link in the navigation frame. You can also change the navigation frame if a document is in read or edit mode. Simply have two lines of the code, pointing to different pages, and use the appropriate hide when configuration.


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 > Social Computing (25 articles)
   Integrating Twitter with an IBM internal social network
   Fun with Sametime and Skype
   More thoughts on social computing and Lotus
Home > Lotus Technologies > LotusScript (64 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Little known traps about Lotus Notes fields
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
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Five trends for 2010
DominoPower TV Episode 1: Inside a strategy session with Teamstudio
More about Domino log files
Say goodbye to the Uh-Ohs. Long live the Tens.
Why your log.nsf might not be purging properly
Latest Lotus Headlines
Recommended Maintenance - Lotus Notes Traveler
Here are the slides and other materials from our Lotusphere session
Microsoft OCS awareness in Lotus Connections and Websphere Portal?
SnTT: XPages Blank Calendar Control (Part 2), adding data
Have your Lotus Notes calendar display multiple time zones
Sample Database for Microsoft Office and Lotus Symphony Integration
Symphony 3.0 beta signals another attack on Office
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad: Apple's latest heartbreaker
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Running auto-respond rules when Outlook is closed
-- Advertisement --

Power Tools 6.0 is a set of 90 administrative utilities for Lotus Notes & Domino
Power Tools simplifies management of the Notes/Domino environment by automating routine tasks. Power Tools can manage or monitor mail files, groups, ACLs, agents, LOG.NSF, templates and more.

Download a trial version from helpsoft.com.
-- Advertisement --

Struggling with exporting Notes data to spreadsheets? No More!
Try IntelliPRINT, The world's leading Reporting, Dashboards, and Analysis solution for Notes & Domino

  • Don't spend unproductive time maintaining different versions of the same spreadsheet
  • Preserve data integrity and security in multi-user environments
  • Create reports in minutes INSIDE Notes
  • Get freedom from iterative report requests, deliver self-serve capabilities

Experience Reporting, Dashboards, and Analysis INSIDE Notes.

Try IntelliPRINT NOW!

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