|
|
|
|
|
|
|
|
|
|
|
|
|
|
Implementing dynamic drop-down menus using Domino and Internet Explorer (continued)
The windscreen wipers were on the left instead of the right. The indicators were on the right instead of the left. The lever to pop the hood was on the driver side instead of the passenger side. For a few months I wiped the windshield every time I turned a corner, but I eventually adjusted and got it worked out.
Developing for a Web browser instead of a Notes client was a similar experience. Basically, the Web browser carried out the same function as the Notes client. The Web browser allowed me to develop Lotus Domino applications for end users, create forms, create views, get data, process it and return meaningful results. It was, however, different from the Notes client. Many things that were trivial in the Notes client now required thinking, programming, and (yuk!) JavaScript. In most cases, I could get to the same goal, but I had to think differently to get there. For a few months I wiped the proverbial windshield every time I turned a programming corner, but I eventually adjusted and got it worked out.
One of the application functions that I used regularly in Notes client applications was cascading field values. Change field A, and the values of field B would automatically change to the appropriate related values. This is highly useful and can be applied time and time again.
Mazda cars include RX-7, Eunos, 323, MX-5, Tribute, and Premacy models. Ford cars include Thunderbird, Taurus, Windstar, Escape, and Mustang models. Alfa Romeo cars include GTV, Spider, GTA, and Alfasud models. Change the Manufacturer field, and the Model field changes to include the appropriate models for that Manufacturer.
Browser-based Domino applications can do this fairly easily by refreshing the page after field A has been changed, doing a round trip to the server, and picking up a new set of values for field B. The problem with this approach is that it's time and bandwidth consuming and clunky, and it doesn't make for much of an experience for the end user. No, we need something better.
We need a solution that allows the end user to cycle through the values in field A and immediately see the changes in field B. Much better. More scalable, more snappy, more professional, and a better user experience.
So lets get down to work and build a small demonstration Domino application that implements cascading field values. We'll have two fields, "Manufacturer" and "Model". The values for these will be picked up from a Notes view. The end user will be able to drop down the Manufacturer field and immediately see the Model field updated. Our demonstration will be built for Internet Explorer 5.5 only. It might work with other browsers, but doing so is an exercise left to the reader.
The example database for this article requires Domino 5 and Internet Explorer 5.5 or later. You can download the demo database at http://www.touchdown.com.au/dpmar2002.zip.
The essential essence The essential essence of our solution is that we will put the contents of a Notes view into a JavaScript keyword array at the browser client. Whenever field A changes, client side JavaScript will dynamically pluck values out of the JavaScript keyword array and update field B with a new set of values according to the current value of field A.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.
The many included activities and demos will make you a pro! Expert instructor help is a click away.
Click here to try a FREE demo course!! |
-- 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! |
|
|
|
|
|
|
|
|
|
|