We help IT Professionals succeed at work.

Available times on a form, based on popup calendar date picker

Adker asked
Last Modified: 2008-03-17
Currently a user selects a date from a popup calendar, this date is then put into the text box. Works fine.

The next two drop down boxes contain times that are availbale based on the date returned from the calendar. These drop down boxes are populated thru Javascript when the fields are clicked, onClick. Functionaly it works, but it is a bit cluncky.

It takes two clicks, one to call the javascript and one to see the available choices. The first click also causes the page to blink as the drop downs are populated.

onChange for the date field does not work.

I'd like to return the available times as well as the date when the user selects their date from the popup. Is this possible. Any other ideas on how to make this transparent to the user while keeping it all on a single page?

The following link will take you to our demo. You will need to click continue to get the page with the calendar popup.

Thanks in advance for any and all responses.



The calendar javascript is here:
Watch Question


I haven't had a chance to look particularly in-depth to solve your problem, however a quick solution that will work only in IE would be to use the event onpropertychange rather than onchange.  If you remove the onfocus event of the date selection and place the onpropertychange event of the date field to point to strother1_OnMouseOver, then you will get the desired effect (however, only in IE).



Good point, but originally we had the IE only solution. Requirements changed and we needed to update.

Thanks for taking the time to look it over!
This one is on us!
(Get your first solution completely free - no credit card required)
Oh just a little FYI.  If you're wondering why onChange doesn't work it's because onChange fires when the element's focus is lost IF the value has changed...this is not the same as firing when the value changes. So if a user clicks a text field, makes some changes, and clicks off, the test to see whether or not the value has changed occurs when the user clicks off and NOT when the value changes.


Your suggestions worked great. Thank You
Happy to help :)  One of the best things about programmers & programming is the community..., I can't imagine any industry where it's this easy to get good specific help for your problems.

Good luck with your project


Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.