Forum Moderators: phranque
When you select, say March 1, 2004 for the check-in date, the check-out date will be immidately changed to March 2, 2004, without the need to use the calendar again.
Thanks.
---------
I was searching online during the past week with the hope to find the solution by myself, but failed.
So I turned to webmasterworld.com.
I hope the link has not offensed this board's rules.
Thanks again
[edited by: Woz at 11:30 pm (utc) on April 3, 2004]
[edit reason] No URLs please [/edit]
<script language="javascript">
// <!--
function openCalendarCheckIn()
{
var theForm = document.searchForm;
var cDate = theForm.checkInDate[theForm.checkInDate.selectedIndex].value;
var cMonthYear = theForm.checkInMonthYear[theForm.checkInMonthYear.selectedIndex].value;
var url = '/h/d/hi/280/zh/calendar?monthYear=' + cMonthYear + '&date=' + cDate + '&checkOut=false&secure=false';
if(navigator.userAgent.indexOf("AOL 6.0")!= -1 ¦¦ navigator.userAgent.indexOf("AOL 5.0")!= -1) {
newWin = window.open(url,'HI','DEPENDANT=YES,WIDTH=225,HEIGHT=230,TITLEBAR=YES,STATUS=YES,MENUBAR=NO,SCROLLBARS=NO,TOP=0,LEFT=0');
} else {
var topPos = (screen.availHeight/2)-115;
var leftPos = (screen.availWidth/2)-105;
newWin = window.open(url,'cal','top=' + topPos + ',left=' + leftPos + ',dependent=yes,width=225,height=230,screenX=' + leftPos + ',screenY=' + topPos + ',titlebar=yes');
}
newWin.focus();
return false;
}
function openCalendarCheckOut()
{
var theForm = document.searchForm;
var cDate = theForm.checkOutDate[theForm.checkOutDate.selectedIndex].value;
var cMonthYear = theForm.checkOutMonthYear[theForm.checkOutMonthYear.selectedIndex].value;
var url = '/h/d/hi/280/zh/calendar?monthYear=' + cMonthYear + '&date=' + cDate + '&checkOut=true&secure=false';
if(navigator.userAgent.indexOf("AOL 6.0")!= -1 ¦¦ navigator.userAgent.indexOf("AOL 5.0")!= -1) {
newWin = window.open(url,'HI','DEPENDANT=YES,WIDTH=225,HEIGHT=230,TITLEBAR=YES,STATUS=YES,MENUBAR=NO,SCROLLBARS=NO,TOP=0,LEFT=0');
} else {
var topPos = (screen.availHeight/2)-115;
var leftPos = (screen.availWidth/2)-105;
newWin = window.open(url,'cal','top=' + topPos + ',left=' + leftPos + ',dependent=yes,width=225,height=230,screenX=' + leftPos + ',screenY=' + topPos + ',titlebar=yes');
}
newWin.focus();
return false;
}
function populateCheckOut()
{
var theForm = document.searchForm;
if ((theForm.checkOutMonthYear.selectedIndex == 0) ¦¦
(theForm.checkOutMonthYear.selectedIndex < theForm.checkInMonthYear.selectedIndex) ¦¦
((theForm.checkOutMonthYear.selectedIndex == theForm.checkInMonthYear.selectedIndex) &&
(theForm.checkOutDate.selectedIndex <= theForm.checkInDate.selectedIndex))) {
if(theForm.checkInMonthYear.selectedIndex!= 0) {
if (theForm.checkInDate.selectedIndex > 29 ) {
theForm.checkOutDate.selectedIndex = 1;
theForm.checkOutMonthYear.selectedIndex = theForm.checkInMonthYear.selectedIndex + 1;
}
else if ((theForm.checkInDate.selectedIndex == 29 ) &&
((theForm.checkInMonthYear.selectedIndex == 4) ¦¦
(theForm.checkInMonthYear.selectedIndex == 6) ¦¦
(theForm.checkInMonthYear.selectedIndex == 9) ¦¦
(theForm.checkInMonthYear.selectedIndex == 11))) {
theForm.checkOutDate.selectedIndex = 1;
theForm.checkOutMonthYear.selectedIndex = theForm.checkInMonthYear.selectedIndex + 1;
}
else {
theForm.checkOutDate.selectedIndex = theForm.checkInDate.selectedIndex + 1;
theForm.checkOutMonthYear.selectedIndex = theForm.checkInMonthYear.selectedIndex;
}
}
}
}
//-->
</script>
[edited by: Woz at 11:31 pm (utc) on April 3, 2004]
[edit reason] No URLs please, TOS #13 [/edit]