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.
Using dynamic HTML and JavaScript in Domino (continued)

The string variable htmlScript contains JavaScript code to which I pass, using LotusScript, the number of projects. When the browser receives this page this portion of the JavaScript looks like this:

phase = new Array(27)
for (i=0; i < 27; i++) {
phase[i] = ""
}

Again, I determine the color depth and finish declaring and setting the JavaScript variables by sending the appropriate resolution graphics to the browser.

The Script subroutine builds six JavaScript functions: load(), unLoad(), showHelp(), mouseOut(), mouseOver(), and curtainHigh().

The load() function initiates when the page is completely loaded. The first thing it does is assign the appropriate resolution graphics throughout the application. For example:

document.layers["roadmap"].document.layers["backgrd"].document.images["rmap"].src = Roadmap.src;

Then the load() function lays out the icons over the Roadmap graphic through a JavaScript for loop. Again, the JavaScript starts out as a simple LotusScript string. But we pass the number of projects LotusScript variable to build the JavaScript function. When the page loads, we populate the JavaScript phase[] array, as shown below. Now that the page is loaded, we can use the JavaScript switch method to then determine exactly which of the six "phases" along the Roadmap the application should plot each project. If the phase is "Project Proposal," for example, I increment a variable to know the number of projects in that phase. Each phase is divided into several columns. The first column in the Project Proposal phase can contain 15 icons. So I set some offset variables depending on which column the icon will appear.

|for (i=0; i <= (| & Cstr(g-1) & |); i++) {
switch (phase[i]) {
case "Project Proposal" :
IG++;
if (IG < 15) { Toff = 30; T = IG; L=01; }
if ((IG >= 15)&&(IG < 28)){ Toff = 40; T = ++IG2; L=22; }
if ((IG >= 28)&&(IG < 40)){ Toff = 50; T = ++IG3; L=43; }
if ((IG >= 40)&&(IG < 51)){ Toff = 60; T = ++IG4; L=64; }
if (IG >= 51){ Toff = 70; T = ++IG5; L=85; }
break;
É
document.layers["roadmap"].document.layers["s" + i].left=L;
document.layers["roadmap"].document.layers["s" + i].top=Toff+(T*20);

The last part of the JavaScript for loop assigns each layer containing an icon the appropriate horizontal and vertical offset. Each column is staggered half the height of the icon so that the project name acronyms do not overlap. Finally, the load() function executes the changeDisplay() function in the header frame. By taking the variable we parsed out of the URL in LotusScript and building the JavaScript line of code.


« Previous  ·  1  ·  2  ·  3  ·  4  ·  5  ·  6  ·  7  ·  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 > Internet Technologies > HTML and CSS (15 articles)
   Using a reusable code approach to HTML select option lists
   One reader's opinion on HTML mailing
   Keep lookin' good with Cascading Style Sheets
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 --

Integrate your Notes Applications with Microsoft Office and Symphony
Integra for Notes Integrates Microsoft Office and/or IBM Lotus Symphony
Requires NO change to the design of the appliation or Installations of DLL's and EXE's
  • Integra is a ready to use solution, enhance static reports with Excel data analysis, pivot tables, macros
  • User friendly aproach, using a point and click access to features
  • Reports from any Lotus Notes databases
  • Runs reports through a Notes client, web browser and scheduled basis
  • Allows use of LotusScript for advanced data manipulation
  • Enables self service reporting capabilities to end-users


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