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

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