Search DominoPower's 11,443 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.
A dynamic menu management system for the Web and Notes (continued)

@If(MenuHeadingGIF!="";MenuHeadingGIF + " " + "[<font face=\"Arial\" size=\"-1\" color=\"#FF0033\">" + MenuItemHeading+ "</font>]";"[<font face=\"Arial\" size=\"-1\" color=\"#FF0033\">" + MenuItemHeading+ "</font>]")

The second visible column contains the formula that actually builds the HTML links. The title of this column is "[<ul>]" (without quotes) in order to enable the <li> code to work and create a bullet in front of each link. Here is the code for the version that goes on a page that does not use frames:

db := @Subset(@DbName; -1);
url := MenuBaseURL + MenuItemURL;
status := @If(StatusBarMessage !="";" onMouseOver=\"window.status='" + StatusBarMessage + "\'; return true\"";"");
"[<li><a href=\"" + url + "\" class=\"roll\"" + status + "><font face=\"Arial\" size=\"-2\">" + MenuItemName + "</font></a>]"

Notice that in the above code I've inserted JavaScript to indicate that the contents of the StatusBarMessage field should be shown in the status bar of the browser when the mouse is placed over the link. I've also used the power of Cascading Style Sheets (class =\"roll\") to change the color of links onMouseOver events (this works in IE 4.0 for me but not Navigator 3.0). Just remember that to make this work you need to put code in the $$HTMLHead field to define the style. You can see how I've done this on my Main Document Form -- which is included in the database. You can see how the Web Menu View looks on the Web in Figure C.

FIGURE C


Here is how the non-framed version of the Web Menu View looks on the Web. Roll over picture for a larger image.

The code for the version that works in a framed environment is only slightly different. The difference is in the formula for the second visible column, and here it is:

db := @Subset(@DbName; -1);
url := MenuBaseURL + MenuItemURL;
target := @If(MenuItemTarget != "";MenuItemTarget;"BodyFrame");
"[<a href=\"" + url + "\" class=\"roll\" target=\"" + target + "\"><font face=\"Arial\" size=\"-2\"><li>" + MenuItemName + "</font></a>]"

Note how I use the value from the MenuItemTarget field to determine the target of the link. I could have also included the onMouseOver code used in the non-framed version as well.

How it works in Notes
You might be asking yourself, "Well, this is all well and good, but how do you use the menu in Notes?"

The solution was so simple it evaded me for a few days. Just use the launch properties of the Menu Item Form that contains the link information to redirect the user to either the Notes doclink or to a URL. And this is exactly what I did. I couldn't (without programming, that is) specify for the form to open either a Notes Link or a URL link, so I took the simple route to solving the problem. I just made two almost identical forms, one that automatically opens up the Notes doclink (Menu Item Form) and one that opens up the URL that is contained in the URL field of the document (Menu URL Item Form). Then, if a menu item links to a URL and does not have an associated Notes doclink, I just use the Menu URL Item Form so it will automatically launch the URL instead.


« Previous  ·  1  ·  2  ·  3  ·  4  ·  5  ·  Next »
Other articles you might like
Home > Lotus Technologies > Notes (84 articles)
   A walk down Memory Lane with Lotus Notes
   An application for scanning physical mail and distributing it virtually
   Managing Notes deployments with Teamstudio Build Manager
Home > Lotus Technologies > Application Development (48 articles)
   An application for scanning physical mail and distributing it virtually
   How hide-whens in Rich Text can ruin your whole day (and what to do about it)
   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
Syncing Notes with Android phones
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
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
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: Online safety for virtual learning
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Seek and find: Strategies to locate filed-away emails fast
-- Advertisement --

Find unused Lotus Notes groups and clean up your address book
Have you ever wanted to get rid of old Lotus Notes groups that were cluttering up your address book, but you weren't sure if they were used? Find Unused Groups can help.

Find Unused Groups will check your ACL, mail, multi purpose and server groups to help you determine if they are used, and who uses them.

Learn how to easily clean up your address book.

-- Advertisement --

Teamstudio Edition 25 has shipped
It's finally here! Now that Teamstudio Edition 25 has shipped, listen to our latest Tool Time audio program to find out what's changed. Updates to all your favorite Teamstudio tools will be discussed.

Plus, you'll get an introduction to Teamstudio Undo (formerly known as Teamstudio Snapper).

Tap here to get started!

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