Browse DevX
Sign up for e-mail newsletters from DevX


Simplifying Date Data Entry, Part II

How to make a calendar page pop-up functional by filling in user-entered date fields on a form.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

n last month's article I showed you how to create a calendar page in ASP with pop-up functionality. In this month's article, I'll show you how to make your pop-up functional with an application by filling in user-entered date fields on a form.

Collecting dates on Web pages using HTML forms has always been fraught with problems. Users do not always enter dates in the format you need requiring additional validation code on the server. Forcing users to pick from list of Year/Month/Dates makes the user interface cumbersome.

Simplify the user experience. Allow users to pick dates using a Calendar metaphor, simply by clicking and selecting the date of choice. Ensure accurate date data entry each time.

There are two pages in operation: the original HTML (or ASP) page that displays the date text field (DateEntry.htm) and an ASP page (calpop.asp) that displays the calendar. You can obtain a copy of the two files here. The next step is to hook up the two pages.

If you are familiar with JavaScript, you know that the window object (browser) has an "open" method that invokes a pop-up window. The method has the following syntax:

oNewWindow = window.open( [sURL] [, sName] [, sFeatures] [, bReplace])

Method Description
ONewWindow A variable that holds the reference to the pop-up window
sURL A string that specifies the URL for the pop-up window
sName A string that specifies the name for the pop-up window, for use in script
sFeatures A string that specifies the look and size of the pop-up window
bReplace A boolean value that specifies whether the pop-up window occupies a place in the browser's history or not.


Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date