Search DominoPower's 10,675 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.
DOMINO WEB COMPONENTS
Build a Domino pop-up calendar widget using formula language
By Daniel Koffler

Although available when programming for the Lotus Notes client, Domino does not provide any built-in widget or applet that lets Web client users easily select a date from a calendar to fill in date-based fields. As it stands, most Domino forums and programming guides advocate installing a 3rd party JavaScript or Java applet-based calendar.

This is wholly unnecessary as the Lotus Formula Language has amazing date handling functions that will let you easily build a customizable and reusable popup calendar in any web accessible Domino database.

The theory of calendars
That calendars and date calculation seem like an arcane science to most is no surprise if you have ever examined the Java or JavaScript behind your favorite popup calendar.

In reality, building calendars is relatively simple when you understand how they are organized. Every calendar is simply a table consisting of seven columns (the days of the week) and between four to six rows depending on what day of the week the first of the month falls on and how many days are in the month. You can see a sample calendar in Figure A.

FIGURE A


Every calendar is a grid of seven columns and four to six rows. Roll over picture for a larger image.

You can think of the rows as "how many Sundays are in this month?" Look at any monthly calendar and you'll see what I mean, the only tricky part is figuring out what day of the week corresponds to the first of the month. The Lotus Formula Language makes this easy, we'll build most of the calendar in under 10 lines of code.

Basic setup
First, we'll create a new form in Domino Designer called "MyForm" to hold the date field we want to update with the popup calendar. Create a date field on this form named "MyDate". Next to this field on the form type the following code and make it "Pass through HTML":

<a href="javascript:popCal('MyDate')">Calendar</a>

This will create a link in Web browsers viewing this form that will call the JavaScript function popCal and pass it the name of the field to updated, in this case "MyDate". When users click the word "Calendar" when viewing the page, a pop-up calendar will appear and by selecting a date in the calendar, the "MyDate" field will be updated, as shown in Figure B.


1  ·  2  ·  3  ·  4  ·  5  ·  Next »
Other articles you might like
Home > Lotus Technologies > Domino (69 articles)
   Centralised email encryption at the Domino server level
   Getting the Domino server time with @Now
   When the email flood inundates the Domino Server
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
What to look for in a Domino-based document management solution
Understanding Domino.doc end-of-life options
When the debugger won't debug hidden code that isn't hidden
What to do if the LotusScript debugger won't single-step over code
Top 10 ways to launch and build a Lotus consulting practice (with a little help from the Beatles)
Troubleshooting an OpenSuse Notes install
Incident report: denial of service attack against ConnectedPhotographer.com
Latest Lotus Headlines
SnTT - Enabling ALL the bells and whistles!
Tivoli Data protection causes Domino to crash
Fun when running DB2 CLP scripts
Introducing Flippr, the easy way to admin Quickr
DXL and fake security
Using search forms in IBM Workplace Collaborative Learning 2.7
Schmidt, Freed, and Gering on the OVF Toolkit
>> Read all the news
More from the ZATZ journals
Computing Unplugged: Eight steps to successful and reliable home backups
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Can Outlook run when it's not running (and other mysteries)?
-- Advertisement --

SECURTRAC - MONITOR AND CONTROL YOUR DOMINO ENVIRONMENT
When it comes to your business, how do you ensure compliance with SOX, HIPAA or other industry driven regulations? Use SecurTrac to monitor and audit the life cycle of all objects in your Domino environment.
  • Database Monitor
  • Mail Monitor
  • Domino Directory Monitor
  • Notes.ini File Monitor
  • Intrusion Detection Monitor


Click here for details and a free evaluation copy.
-- Advertisement --

Good Practices... Better Practices... Teamstudio.
Implementing good practices in your Notes environment doesn't have to be complicated.

Teamstudio provides software and services for efficient Notes development and simple, secure administrator control. Our new website also provides users with a library of resources to help, including:

  • Ready-to-implement policies for good practice development and deployment in Lotus Notes
  • On-demand webinars on topics ranging from tips for better coding, to securing your applications, managing agents, and streamlining your application deployment process
  • Free utilities for download to help you more more efficiently tackle several specific tasks in Notes development
Visit our library of white papers to help you take on difficult issues in your Notes environment.

Drop by our new website and take a look!
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2009, ZATZ Publishing. All rights reserved worldwide.
Editor's Login