I tried this and it does not work.
Main Topics
Browse All TopicsI have an image that activates a pop up calendar, I would like the user to select the date and then have the form submit with the date that the user selected. How do I do this?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
This is the code for the date field and image to select the date
<td><input type="text" name="from" id="from" value="<cfif isdefined("form.from")>#fo
<img src="../../graphics/dateBt
swartout,
The easiest thing for you to do is use one of the free javascript calendars that are out there. You can find a few different varieties at:
http://www.rainforestnet.c
What you should do is this:
You put a hidden input field on the first page
You select a date and enter the date in the hidden input field,
Then you submit.
Something like:
<form action="url">
<input type="hidden" name="date">
<img src="../../date.gif" onclick=" (popup code) ">
</form>
and in the pop-up you have:
<a href="##" onclick="parent.form.date.
Hope this helps.
In that case, I'm assuming that you have the JavaScript needed for generating the calendar because that is the biggest part. The link that needs to be on each date that will supply the date value back to the main window. You can do that with something like:
<a href="javascript:winMain.d
In the pop-up window use a function like this one and pass it the month, day, and year or the whole date at onece.
function pickDate(m,d,y)
{
if (window.opener && !window.opener.closed)
window.opener.document.for
window.close();
}
Then, have the hidden field submit the form by doing something like the following.
<input type="hidden" name="selectedDate" value="" onPropertyChange="formName
i would suggest that u use the button only for popping up the calender...
when the user selects the date...
in the pop up page there will be a code that assigns the value to the window.opener.document.for
after this part of code
window.opener.document.for
window.close();
PS: what u r doinf submitting the parent window form from the pop up itself...
Regards
Hart
Hart,
You've said it! That's why I was suggesting using any of the canned JavaScript calendar scripts. The logic is flawed and would not work except the way you suggested. The popup window *always* has to pass the value to the formfield in the main window and not submit it. I would love to find out if there is any other way to pull it off.
Hey swartout you may want to check out this page>> http://www.mattkruse.com/j
It may be a different calendar than what you got but it also displays the source for it, may get some ideas there, otherwise you can use the one they have on that and there are many of these types out there and pretty easy to find! Hope that helps!
~trail
Business Accounts
Answer for Membership
by: mrichmonPosted on 2004-03-04 at 08:22:09ID: 10515257
You can use javascript to submit.
.submit(); "
Have a hidden field that gets populated with the date from the calendar and then have the button submit
<input name="thedate" type="hidden" value="">
Assume that your form is named dateform
add to the onClick function to the image button.
onClick="document.dateform