aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes creating a pop up calendar within a form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "creating a pop up calendar within a form" Watch "creating a pop up calendar within a form" New topic
Author

creating a pop up calendar within a form

trisha west
Greenhorn

Joined: Aug 13, 2003
Posts: 4
Hi,
I am working to create a pop up calendar which puts the selected date as an input to a form. I can do this when the only "select" in the form is this date. But now, I need to do two things.Firsrt, there's a drop down list that allows user to enter a date "before", "after" or "between" and Second, depending on which of the three the user selected, pop up one or two (for "between" )form field ( as a part of the same form ) where the user can now use the calendar to enter the date.
Any advice would help.
thanks.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Look at this links and see if this is what you are talking about:
http://www.dynamicdrive.com/dynamicindex6/popcalendar.htm
http://www.dynamicdrive.com/dynamicindex6/popcalendar2.htm
http://www.javascriptkit.com/script/script2/timestamp.shtml
trisha west
Greenhorn

Joined: Aug 13, 2003
Posts: 4
Thanks Eric. But I do have the pop up calendar. What's not working is the second part where I have:
<FORM name='theForm'>
Enter a date
<SELECT name="date" onchange='popupCalendar()'>
<OPTION value = 'before' type=text >before</OPTION>
<OPTION value = 'after' type=text >after</OPTION>
<OPTION value = 'between' type=text >between</OPTION>
</SELECT>
</FORM>
What I want popupCalendar() to do is,
if user selected 'before', pop an input field with an icon similar to one of those in the links you gave.
The final aim is that I can make a sql stmt of the order
WHERE startDatevalue = 'before', Date = <user Selection from calendar>.
If the user selected "between", the same stmt would change to
.....WHERE startDateValue= 'between', earlyDate=<earlier of the two Dates>, laterDate=<later of the two Dates>.....
Thus if user selected 'between' I have to pop up two such objects (each consisting of an input field and an icon for calendar).
I can use 'switch' to do that. But I dont know how to have this input field without using html in the script itself.
Hope this clarifies the problem.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
This is just a dynamic sql statement. I currently have something like this in effect at my work. Are you doing this in jsp or asp?
trisha west
Greenhorn

Joined: Aug 13, 2003
Posts: 4
JSP
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: creating a pop up calendar within a form