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 first JavaScript function is called changeDisplay. It accepts a variable of which main layer to show. The first thing it does is call the second function hideLots, which simply hides all the layers in the header and in the content frame. We can control layers in another frame by referring in JavaScript to the "top" document, the named frame, then the layer, as in:

top.frames["content"].document.layers["roadmap"].visibility = "HIDDEN";

Once everything is hidden I show the layer passed to the JavaScript function along with other elements particular to that layer. The four chart layers have a "proprietary and confidential" label. To accomplish the labels along the header, I put the text inside a SPAN tag that refers to a CSS and within a LAYER tag. The HREF in the label is not a URL but a reference to the JavaScript changeDisplay function.

The content page
The form I mentioned above contains the heart and sole of the application. Actually, a LotusScript agent that the form instantiates by way of a $$QueryOpenAgent contains most of the application logic.

The form simply has a $$QueryOpenAgent field, a Query_String field, and fields to contain the JavaScript, Roadmap, Portfolio, Financial, and Status code. Using this method has several advantages. The LotusScript is very fast. This allows the browser to load essentially one page, providing a programmable event when the page is done loading. This allows me to code efficiently by assigning variables once when initializing the agent and reusing them. Also, I can then divide the agent into manageable subroutine routines, one for each chart. Simply printing the LotusScript agent to the screen does not provide access to CGI variables.

The first HTML sent to the browser is "please wait" message. A simple message with a progress bar occupies the user while the project information loads. The progress bar is a JavaScript function that progressively reveals more of a blue bar. Once the page is loaded, the onLoad JavaScript function hides the layer containing the message and progress never to be seen again.

After declaring and setting some variables, like image path and CSS strings, the agent really goes to work. First, it loops through all the project documents to build a LotusScript array containing 17 variables from each project. Then it parses the query string to determine which chart the application should open to. It then calls the first subroutine routine, the Script subroutine, and passes the number of projects and the query string.

The Script subroutine is the foundation of the application. Within the LotusScript agent, I begin declaring JavaScript variables, 51 to be exact. These are all JavaScript variables that will reside within the content page itself. Four of the 51 variables are arrays. Since I passed the number of projects to the LotusScript function, I can now use that to pass to the JavaScript function.

htmlScript = |
phase = new Array(| & Cstr(g) & |)
for (i=0; i < | & Cstr(g) & |; i++) {
phase[i] = ""
}|


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

Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.

Register by April 10 to save $200.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login