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