Search DominoPower's 11,441 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.
Implementing dynamic drop-down menus using Domino and Internet Explorer (continued)

Getting there is a bit fiddly, mainly because there are lots of bits and pieces required to get a working solution together. None of the individual tasks are difficult though.

Here's the way it works:

  • A two-column Notes view provides the raw data. Column one corresponds to field A value, column two corresponds to field B value.

  • When the Domino form is loaded, a WebQueryOpen agent is triggered. This agent grabs the contents of the columns of the Notes view. The agent formats the columns to appear as a JavaScript array and outputs to a field on the domino form.

  • The field on the Domino form is inside a pair of HTML <script> tags, so the Notes view values become values within the JavaScript keyword array.

  • The Domino form contains field A (the "Manufacturer" field) and field B (the "Model" field).

  • The form contains a JavaScript function that clears field B of its values and then reloads it with a new set of values corresponding to the current value of field A. When the HTML page is loaded into the Web browser, the function is automatically triggered by an "onload" event in the HTML header.

  • Field A's HTML attributes contain an "onchange" event that triggers when the field value is changed. This calls the JavaScript function that updates field B to contain the appropriate values corresponding to the current value of field A.

Constructing the demo: overview of the steps
To construct the demonstration we will carry out the following steps:

  1. Create a new Domino database;
  2. Create the form;
  3. Create the fields;
  4. Create the JavaScript function that updates field B;
  5. Create the view containing the raw data;
  6. Create the agent;
  7. Create the field that will hold the JavaScript keyword array and place it within the <script> tags;
  8. Create an "onload" event in the HTML header;
  9. Add the agent to the "WebQueryOpen" on the form;
  10. Set to pass-thru HTML
  11. Test and finish.

Step 1: Create a new Domino database
Create a new, blank Lotus Domino database, giving it whatever name you want.

In the database properties, turn off "Web access: Use JavaScript when generating pages".

Step 2: Create the form
Create a new form and name it "Demo".

In the form properties, make sure that "Treat document contents as HTML" is turned off.

At the very bottom of the form put the following line, which will prevent display of the submit button automatically generated by Domino. Ensure this remains as the final line at the end of the form throughout these instructions.

<noscript>

Step 3: Create the fields
Now we'll create the fields. Field A (the Manufacturer field) contains a list of car Manufacturers. When the user changes the value of field A, the "onchange" event attached to Field A will trigger, and field B will then be updated with the names of car models available from that Manufacturer.


« 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
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
2010: A Lotusphere of change
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: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done. Native to Lotus Domino. The User Experience unseen for Lotus Domino. Do more with less. Really.

See the possibilities Docova unleashes for Lotus Domino.
-- Advertisement --

Struggling with exporting Notes data to spreadsheets? No More!
Try IntelliPRINT, The world's leading Reporting, Dashboards, and Analysis solution for Notes & Domino

  • Don't spend unproductive time maintaining different versions of the same spreadsheet
  • Preserve data integrity and security in multi-user environments
  • Create reports in minutes INSIDE Notes
  • Get freedom from iterative report requests, deliver self-serve capabilities

Experience Reporting, Dashboards, and Analysis INSIDE Notes.

Try IntelliPRINT NOW!

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