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