classic asp calendar

Webboy2008
Webboy2008 used Ask the Experts™
on
I have classic asp application - within the webpage has <input type="text" name="dob">
What I want to do is: when the someone click/mouse over/focus on the textbox,
a calendar will be pop up, just like ajax. But I don't want a new window open.

Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Big MontyWeb Ninja at large

Commented:
this would be done via javascript as it needs to be controlled via the client. if you use jQuery, here's a simple one to implement:

http://jqueryui.com/demos/datepicker/
see this:-

http://javascript.about.com/library/blcal.htm
javascriptcalendar.org
My favorite is this one from Marc Grabowski (files attached). It uses JS and CSS only, so is light, clean and fast; and easily styled the way you want it via the CSS file.

Setup is easy...

1. Simply include the files in the HEAD section of your page, like so:


<script src="/includes/calendar.js" type="text/javascript" language="javascript"></script>
<style type="text/css" media="screen,projection">
      @import url(/includes/calendar.css);
</style>

2. Add a div called calendarDiv somewhere on the page (I usually put it just above the </form> line), like so:

<div id="calendarDiv"></div>

3.  Attach a popup calendar to any form field by setting the class of that form field to "calendarSelectDate", in your case that would look like this:

<input type="text" name="dob" class="calendarSelectDate">

5. Style the CSS to make it look the way you want.

You're done!

For more details the source is here:
http://marcgrabanski.com/article/clean-calendar
calendar.js
calendar.css

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial