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