I have a drop down list system (works to some extent) for a date range search
that I need to do a little more. The following is a small sample from the
script:
function modify_mo_list( mo_model)
{
molist = document.forms[0].querymo2;
if (mo_model == '/01/') {
var i = 0;
molist.options[i++] = new Option('Februar y','/02/');
molist.options[i++] = new Option('March', '/03/');
molist.options[i++] = new Option('April', '/04/');
molist.options[i++] = new Option('May','/05/');
molist.options[i++] = new Option('June','/06/');
molist.options[i++] = new Option('July','/07/');
molist.options[i++] = new Option('August' ,'/08/');
molist.options[i++] = new Option('Septemb er','/09/');
molist.options[i++] = new Option('October ','/10/');
molist.options[i++] = new Option('Novembe r','/11/');
molist.options[i++] = new Option('Decembe r','/12/');
molist.options[i++] = new Option('January ','/01/');
molist.options. length = i;
}
}
The entire list is comprised of Months Jan-Dec and years 1990-2006. I have it
automatically selecting the next month, when the user selects June in the first
box it automatically changes the second box to July. The year also when changed
updates the next year box. But what I also need is for the year to advance 1
year if December is selected, so that the search is from December 2000 to
January 2001. Right now it will display December 2000 to January 2000. However
when the actual searching takes place in my cgi it searches based on the input,
having those dates as input it will actually search and print everything it
finds except what is between those dates as it is looking for greater than
December 2000 and less than January 2000.
So basically I need it to change the date as it does for all months other than
December, where it is to change the year to the next year.
I have tried so many things to no avail. If someone has a suggestion let me
know.
You can view a working sample here:
<a href="http://www.inspiration aldistributors. com/search4date.htm l">
http://www.inspirationaldistributors...arch4date.html
</a> You should also be able to see the source code for how it works there also
so you can see all the code involved.
Thanks for any help
Jeff C