|
| |
|
|
rikki
Posts: 388 Joined: 4/4/2004 Status: offline
|
Need some advice on how to - 6/1/2005 12:31:43
Hi I've got a camp booking web page... For the one of the camps I've been requested to block off the database so no one can book on a MOnday or Tuesday... I'd like to do it as a pop up when that is achieved... My first thought was to take something betheball helped me with before and modify it but I don't think I'm going in the right direction... The page I wanted it to work on is where they enter the date ... I've got a script that makes sure the date is entered properly... Any help appreciated!
<%
Dim conntemp, myDSN, myRS, mySQL, varDateStart, varDateEnd
varDateStart = Request.Form("DateStart")
varDateEnd = Request.Form("DateEnd")
Set conntemp=Server.CreateObject("ADODB.Connection")
myDSN ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("../fpdb/index.mdb")
conntemp.open myDSN
mySQL = "SELECT varDateStart,varDateEnd FROM CampImpeesa2a WHERE ((#"&varDateStart&"#) <> Weekday(2) or Weekday(3))"
Set myRS = Server.CreateObject("ADODB.Recordset")
myRS.Open mySQL, conntemp, 0, 1
If myRS.eof OR myRS.bof then
RecordFound=0
Else
varDateStart = 'The Camp is closed on Mondays and Tuesdays'
RecordFound=-1
End if
myRS.Close
Set myRS = nothing
conntemp.Close
Set conntemp = nothing
%>
<script language="javascript" id="jcSpawn">
// Jimco Add-ins Spawn JavaScript
// This script is freely redistributable. //-->
function spawnJimcoPopup(url, name, options, h, w, x, y, scaleType)
{
var windowOptions;
if (scaleType == 'percent')
{
w = (w * screen.availWidth) / 100;
h = (h * screen.availHeight) / 100;
}
if (x == 'center')
{
x = (screen.availWidth - w) / 2;
y = (screen.availHeight - h) / 2;
}
windowOptions = options + ',width=' + w + ',height=' + h + ',left=' + x + ',top=' + y;
newWindow = window.open(url, name, windowOptions);
newWindow.focus();
}
</script>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function isValidDate(dateStr) {
// Checks for the following valid date formats:
// mm.dd.yyyy
// Also separates date into day, month, and year variables
var DateStartPat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{4})$/;
var matchArray = dateStr.match(DateStartPat); // is the format ok?
if (matchArray == null) {
alert("Date Start is not in a valid format.")
return false;
}
// parse date into variables
month = matchArray[1];
day = matchArray[3];
year = matchArray[4];
if (month < 1 || month > 12) { // check month range
alert("Month must be between 1 and 12.");
return false;
}
if (day < 1 || day > 31) {
alert("Day must be between 1 and 31.");
return false;
}
if ((month==4 || month==6 || month==9 || month==11) && day==31) {
alert("Month "+month+" doesn't have 31 days.")
return false
}
if (month == 2) { // check for february 29th
var isleap = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));
if (day>29 || (day==29 && !isleap)) {
alert("February " + year + " doesn't have " + day + " days.");
return false;
}
}
var toDay = new Date()//sets today date
var newDate = new Date(year,month-1,day)//sets the new input date
var dif = newDate-toDay;//difference in miliseconds
dif = Math.ceil(dif/1000/60/60/24);//difference in days
if(dif<0){//if the date is in the past
alert('The date is in the past. Please input a valid date!');
//document.forms[0].elements['DateStart'].value='';
return false;
}
return true; // date is valid
}
function isValidDate(dateStr) {
// Checks for the following valid date formats:
// mm.dd.yyyy
// Also separates date into day, month, and year variables
var DateEndPat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{4})$/;
var matchArray = dateStr.match(DateEndPat); // is the format ok?
if (matchArray == null) {
alert("Date End is not in a valid format.")
return false;
}
// parse date into variables
month = matchArray[1];
day = matchArray[3];
year = matchArray[4];
if (month < 1 || month > 12) { // check month range
alert("Month must be between 1 and 12.");
return false;
}
if (day < 1 || day > 31) {
alert("Day must be between 1 and 31.");
return false;
}
if ((month==4 || month==6 || month==9 || month==11) && day==31) {
alert("Month "+month+" doesn't have 31 days.")
return false
}
if (month == 2) { // check for february 29th
var isleap = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));
if (day>29 || (day==29 && !isleap)) {
alert("February " + year + " doesn't have " + day + " days.");
return false;
}
}
var toDay = new Date()//sets today date
var newDate = new Date(year,month-1,day)//sets the new input date
var dif = newDate-toDay;//difference in miliseconds
dif = Math.ceil(dif/1000/60/60/24);//difference in days
if(dif<0){//if the date is in the past
alert('The date is in the past. Please input a valid date!');
//document.forms[0].elements['DateEnd'].value='';
return false;
}
return true; // date is valid
}
// End -->
</SCRIPT>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-ca">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>CAMP IMPEESA</title>
<script language="Javascript">
</script>
<script language="JavaScript" fptype="dynamicanimation">
<!--
function dynAnimation() {}
function clickSwapImg() {}
//-->
</script>
<script language="JavaScript1.2" fptype="dynamicanimation" src="file:///C:/Program%20Files/Microsoft%20Office/Office10/fpclass/animate.js">
</script>
<meta name="Microsoft Theme" content="copy-of-blends3 1111">
</head>
<body onload="dynAnimation()">
<body onUnload="CheckWindow();" onload="dynAnimation()">
<form method="POST" action="4DateQuery_Imp.asp" language="JavaScript">
<table border="0" width="813" cellpadding="0" style="border-color:#00CCFF; border-collapse: collapse" cellspacing="1" height="1607">
<tr>
<td width="809" colspan="2" height="59">
<p><font size="5"><b>CAMP IMPEESA</b></font></td>
</tr>
<tr>
<td width="221" height="63">
<p><font size="1">PLEASE <span lang="en-us">ENTER THE START AND END DATE OF YOUR
CAMP</span><br>
The system will check the date<span lang="en-us">s</span> and show you which sites are available.</font></p>
</td>
<td width="586" height="63">Fee Schedule
<a dynamicanimation="fpAnimformatRolloverFP1" fprolloverstyle="font-weight: bold" onmouseover="rollIn(this)" onmouseout="rollOut(this)" language="Javascript1.2" href="#FEE">click here
</a>
<br>
<span lang="en-us">Review sites </span>already booked <span lang="en-us">for</span><a href="../BookingReview/1BookingsIMPNEW.asp">
IMPEESA </a><p></td>
</tr>
<tr>
<td valign="top" bgcolor="#9CCFFF" bordercolorlight="#663366" bordercolordark="#663366" width="221" height="945"><font face="Arial" size="2">
<pre><font face="Arial">Start Date <input type=text name=DateStart onBlur="checkdate(this)" size=11 maxlength=11>
End Date <input type=text name=DateEnd onBlur="checkdate(this)" size=11 maxlength=11></font>
</pre>
<p><font size="2">Format should be <br>
<span lang="en-us">mm/dd/yyyy</span></font></p>
<p><span lang="en-us">Camp Impeesa will be closed on Mondays and Tuesdays.
</span><font size="2">
<span lang="en-us"><br>
<br>
</span></font>
<input type="submit" value="Click here to proceed" name="B3" onClick="doDateCheck(this.form.from, this.form.to);" style="border-style:inset; border-width:1; font-family: Arial; padding: 0; background-color: #E6E6E6"></p>
</td>
<td width="586" valign="top" height="945">
<ul>
<li>
<font size="2"><b><span lang="en-us">Bea</span>ver Lodge -</b> The lodge has 3 levels.
Main floor has open lounge with a stone fireplace, dining area,
up-to-date serviced kitchen and a leader's room. Lower level has
individual rooms with bunk beds that can sleep 28 people and a
small meeting room. Upper loft has 2 areas that sleep 12.
<br>
Central heating, 3 flush toilets, 3 showers, and can accommodate
up to 40 people. There are
dishes, cutlery & pots and pans. </font></li>
<li>
<b><font size="2">Annikki</font></b><font size="2"><b> Snow
</b>- Accomodates 20. Rustic log cabin (24 x 24 ) open concept
structure. Main floor has kitchen, dining area and leisure
area. Upper loft for sleeping. No bunks so come
self-contained. Basement has open area and a 2-piece bathroom.
Kitchen has modern appliances. Cabin is heated and also has a
wood burning stove. There are dishes, cutlery & pots
and pans. </font>
</li>
<li>
<b><font size="2">On site resources </font></b>
<ul>
<li><font size="2">Climbing wall & aerial runway (must
be pre-arranged) Please contact Rick Johnston </font>
<span class="850325021-22052004">
<font face="Arial" size="2">519-756-3065 for arrangements.</font></span></li>
<li>
<font size="2">picnic shelter </font> </li>
<li>
<font size="2">camping areas </font> </li>
<li>
<font size="2">camp fire area </font> </li>
<li>
<font size="2">chapel area </font> </li>
<li>
<font size="2">hiking within camp or in
countryside </font> </li>
<li>
<font size="2">climbing wall (must be
pre-arranged.) </font> </li>
<li>
<font size="2">volleyball area </font> </li>
<li>
<font size="2">baseball diamond </font>
</li>
<li>
<font size="2">3 adirondack shelters </font>
</li>
<li>
<font size="2">winter sports - cross
country skiing, snowshoeing,
tobogganing </font> </li>
</ul>
</li>
<li>
<font size="2">Recreation equipment
available</font><ul>
<li>
<font size="2">snowshoes, volleyball
and net; baseball equipment, archery
equipment, soccer balls, bull horns,
frisbees, pa system - outdoor </font>
</li>
</ul>
</li>
<li>
<font size="2">Firewood available for
on-site use </font> </li>
</ul>
<ul>
<li>
<font size="2">
<font color="#FF0000">
<a href="../camppictures/Impeesa/ImpeesaPictures.htm">PHOTO GALLERY</a></font> FOR Camp Impeesa </font>
</li>
<li>
<font size="2">Check out time is by
12 noon Sunday. Ranger will inspect
building for clean-up and then re
lock building. </font> </li>
<li>
<font size="2">Garbage Dumpster is
for regular garbage...All
recyclables please take with you.
</font>
</li>
<li>
<div>
<font face="Arial" size="2">
<em>Check-in is after 4 pm on
Friday and check-out is by 1
pm on Sunday. We cannot
guarantee that we can
accomodate earlier arrivals or
later departures. Excessive
use beyond these times may
result in extra user fees.</em></font></div>
</li>
<li>
<font size="2">No driving down
to camp sites. Carry gear in.
4 wagon carts for use. </font>
</li>
</ul>
<p>
<a href="../DIRECTIONS/Directions-CampImpeesa.htm">DIRECTIONS to Camp Impeesa</a><p>
<b>911#
<span style="background-color: #FFFF00">
827559</span> Township Rd #8<br>
Blandford-Blenheim Township</b><blockquote>
<ul>
<li> # <font size="2">519-632-7606</font></li>
</ul>
</blockquote>
</td>
</tr>
<tr>
<td valign="top" height="536" bordercolorlight="#663366" bordercolordark="#663366" width="809" colspan="2">
<p><span lang="en-us"><a name="FEE"></a>FEE SC</span>HEDULE</p>
<table border="1" width="478">
<tr>
<td bgcolor="#000000" width="83"><font size="1" color="#FFFFFF"><b>SITE</b></font></td>
<td bgcolor="#000000" width="208">
<font size="1" color="#FFFFFF"><b>SCOUTING </b></font></td>
<td bgcolor="#000000" width="104">
<span lang="en-us"><font size="1" color="#FFFFFF"><b>GUIDING</b></font></span></td>
<td bgcolor="#000000" width="100">
<font size="1" color="#FFFFFF"><b>
NON-SCOUTING</b></font></td>
</tr>
<tr>
<td valign="top" width="83"> </td>
<td valign="top" width="104"> </td>
<td valign="top" width="104"> </td>
<td valign="top" width="100"> </td>
</tr>
<tr>
<td valign="top" width="83"><font size="1">Beaver Lodge</font></td>
<td valign="top" width="104"><font size="1">$<span lang="en-us">300an</span></font></td>
<td valign="top" width="104"><font size="1">$300 + gst = $321</font></td>
<td valign="top" width="100"><font size="1">$425+gst = $454.75</font></td>
</tr>
<tr>
<td valign="top" width="83"><font size="1">Beaver Lodge Colony 1 night</font></td>
<td valign="top" width="104"><font size="1">$150</font></td>
<td valign="top" width="104"> </td>
<td valign="top" width="100"> </td>
</tr>
<tr>
<td valign="top" width="83"><font size="1">Annikki Snow</font></td>
<td valign="top" width="104"><font size="1">$1<span lang="en-us">90</span></font></td>
<td valign="top" width="104"><font size="1">$190 + gst = $203.30</font></td>
<td valign="top" width="100"><font size="1">$265 + gst = $283.55</font></td>
</tr>
<tr>
<td valign="top" width="83"><font size="1">Annikki Snow Colony 1 night</font></td>
<td valign="top" width="104"><font size="1">$100</font></td>
<td valign="top" width="104"> </td>
<td valign="top" width="100"> </td>
</tr>
<tr>
<td valign="top" width="83"><font size="1">Picnic Shelter</font></td>
<td valign="top" width="104"><font size="1">$50 per day / $80 per weekend</font></td>
<td valign="top" width="104"><font size="1">$50 per day + gst = $53.50
</font>
<p><font size="1">$80 per weekend + gst = $85.60 </font></td>
<td valign="top" width="100"><font size="1">$70 per day + gst = $74.90</font><p>
<font size="1">$100
per weekend + gst = $107</font></td>
</tr>
<tr>
<td valign="top" width="83"><font size="1">Camping </font></td>
<td valign="top" width="104"><font size="1">$<span lang="en-us">2</span>.00<span lang="en-us">
per person per night</span></font></td>
<td valign="top" width="104"><font size="1">$2 per person per night</font></td>
<td valign="top" width="204"><font size="1">$5 per person per night + gst =
$5.35</font></td>
</tr>
<tr>
<td valign="top" width="83"><font size="1">Adirondack</font></td>
<td valign="top" width="104"><font size="1">$20 per night plus
camping fee</font></td>
<td valign="top" width="104"><font size="1">$20 per night plus
camping fee</font></td>
<td valign="top" width="204"><font size="1">$30 per night plus
camping fee</font></td>
</tr>
<tr>
<td valign="top" width="83"><font size="1">Evening meetings (any
building)</font></td>
<td valign="top" width="104"><font size="1">$<span lang="en-us">25</span></font></td>
<td valign="top" width="104"><font size="1">$25 plus gst</font></td>
<td valign="top" width="204"><font size="1">$50 plus gst</font></td>
</tr>
<tr>
<td valign="top" width="83"><span lang="en-us"><font size="1">
Crests</font></span></td>
<td valign="top" width="104"><span lang="en-us"><font size="1">
$3.00</font></span></td>
<td valign="top" width="104"> </td>
<td valign="top" width="204"> </td>
</tr>
<tr>
<td valign="top" width="83"><span lang="en-us"><font size="1">
Area events </font></span></td>
<td valign="top" width="104"><span lang="en-us"><font size="1">
$1</font></span><font size="1">.00<span lang="en-us"> per person
per night</span></font></td>
<td valign="top" width="104"> </td>
<td valign="top" width="204"> </td>
</tr>
</table>
<p> </td>
</tr>
</table>
</form>
<body onUnload="CheckWindow();" onload="dynAnimation()">
</body>
</html>
|
|
|
|
BeTheBall
Posts: 6385 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Need some advice on how to - 6/1/2005 20:09:41
I am puzzled. I see an onblur event where you call a function called checkdate, but nowhere do I see that function in your javascript? Is there more code???
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
rikki
Posts: 388 Joined: 4/4/2004 Status: offline
|
RE: Need some advice on how to - 6/1/2005 20:20:59
Your puzzled! Let me start from the beginning.. Below is my original code that works great. Now, I need to also check if the date requested is a Monday or Tuesday, then the user gets a message. Hope this makes sense...
<script language="javascript" id="jcSpawn">
// Jimco Add-ins Spawn JavaScript
// This script is freely redistributable. //-->
function spawnJimcoPopup(url, name, options, h, w, x, y, scaleType)
{
var windowOptions;
if (scaleType == 'percent')
{
w = (w * screen.availWidth) / 100;
h = (h * screen.availHeight) / 100;
}
if (x == 'center')
{
x = (screen.availWidth - w) / 2;
y = (screen.availHeight - h) / 2;
}
windowOptions = options + ',width=' + w + ',height=' + h + ',left=' + x + ',top=' + y;
newWindow = window.open(url, name, windowOptions);
newWindow.focus();
}
</script>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function isValidDate(dateStr) {
// Checks for the following valid date formats:
// mm.dd.yyyy
// Also separates date into day, month, and year variables
var DateStartPat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{4})$/;
var matchArray = dateStr.match(DateStartPat); // is the format ok?
if (matchArray == null) {
alert("Date Start is not in a valid format.")
return false;
}
// parse date into variables
month = matchArray[1];
day = matchArray[3];
year = matchArray[4];
if (month < 1 || month > 12) { // check month range
alert("Month must be between 1 and 12.");
return false;
}
if (day < 1 || day > 31) {
alert("Day must be between 1 and 31.");
return false;
}
if ((month==4 || month==6 || month==9 || month==11) && day==31) {
alert("Month "+month+" doesn't have 31 days.")
return false
}
if (month == 2) { // check for february 29th
var isleap = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));
if (day>29 || (day==29 && !isleap)) {
alert("February " + year + " doesn't have " + day + " days.");
return false;
}
}
var toDay = new Date()//sets today date
var newDate = new Date(year,month-1,day)//sets the new input date
var dif = newDate-toDay;//difference in miliseconds
dif = Math.ceil(dif/1000/60/60/24);//difference in days
if(dif<0){//if the date is in the past
alert('The date is in the past. Please input a valid date!');
//document.forms[0].elements['DateStart'].value='';
return false;
}
return true; // date is valid
}
function isValidDate(dateStr) {
// Checks for the following valid date formats:
// mm.dd.yyyy
// Also separates date into day, month, and year variables
var DateEndPat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{4})$/;
var matchArray = dateStr.match(DateEndPat); // is the format ok?
if (matchArray == null) {
alert("Date End is not in a valid format.")
return false;
}
// parse date into variables
month = matchArray[1];
day = matchArray[3];
year = matchArray[4];
if (month < 1 || month > 12) { // check month range
alert("Month must be between 1 and 12.");
return false;
}
if (day < 1 || day > 31) {
alert("Day must be between 1 and 31.");
return false;
}
if ((month==4 || month==6 || month==9 || month==11) && day==31) {
alert("Month "+month+" doesn't have 31 days.")
return false
}
if (month == 2) { // check for february 29th
var isleap = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));
if (day>29 || (day==29 && !isleap)) {
alert("February " + year + " doesn't have " + day + " days.");
return false;
}
}
var toDay = new Date()//sets today date
var newDate = new Date(year,month-1,day)//sets the new input date
var dif = newDate-toDay;//difference in miliseconds
dif = Math.ceil(dif/1000/60/60/24);//difference in days
if(dif<0){//if the date is in the past
alert('The date is in the past. Please input a valid date!');
//document.forms[0].elements['DateEnd'].value='';
return false;
}
return true; // date is valid
}
// End -->
</SCRIPT>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-ca">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>CAMP IMPEESA</title>
<script language="Javascript">
</script>
<script language="JavaScript" fptype="dynamicanimation">
<!--
function dynAnimation() {}
function clickSwapImg() {}
//-->
</script>
<script language="JavaScript1.2" fptype="dynamicanimation" src="../../animate.js">
</script>
<meta name="Microsoft Theme" content="copy-of-blends3 1111">
</head>
<body onload="dynAnimation()">
<body onUnload="CheckWindow();" onload="dynAnimation()">
<form method="POST" action="C:\Inetpub\wwwroot\campbookings1\1IMPEESA\4DateQuery_Imp.asp" language="JavaScript">
<table border="0" width="813" cellpadding="0" style="border-color:#00CCFF; border-collapse: collapse" cellspacing="1" height="1607">
<tr>
<td width="809" colspan="2" height="59">
<p><font size="5"><b>CAMP IMPEESA</b></font></td>
</tr>
<tr>
<td width="221" height="63">
<p><font size="1">PLEASE <span lang="en-us">ENTER THE START AND END DATE OF YOUR
CAMP</span><br>
The system will check the date<span lang="en-us">s</span> and show you which sites are available.</font></p>
</td>
<td width="586" height="63">Fee Schedule
<a dynamicanimation="fpAnimformatRolloverFP1" fprolloverstyle="font-weight: bold" onmouseover="rollIn(this)" onmouseout="rollOut(this)" language="Javascript1.2" href="#FEE">click here
</a>
<br>
<span lang="en-us">Review sites </span>already booked <span lang="en-us">for</span><a href="../BookingReview/1BookingsIMPNEW.asp">
IMPEESA </a><p></td>
</tr>
<tr>
<td valign="top" bgcolor="#9CCFFF" bordercolorlight="#663366" bordercolordark="#663366" width="221" height="945"><font face="Arial" size="2">
<pre><font face="Arial">Start Date <input type=text name=DateStart onBlur="checkdate(this)" size=11 maxlength=11>
End Date <input type=text name=DateEnd onBlur="checkdate(this)" size=11 maxlength=11></font>
</pre>
<p><font size="2">Format should be <br>
<span lang="en-us">mm/dd/yyyy<br>
<br>
</span></font>
<input type="submit" value="Click here to proceed" name="B3" onClick="doDateCheck(this.form.from, this.form.to);" style="border-style:inset; border-width:1; font-family: Arial; padding: 0; background-color: #E6E6E6"></p>
</td>
<td width="586" valign="top" height="945">
<ul>
<li>
<font size="2"><b><span lang="en-us">Bea</span>ver Lodge -</b> The lodge has 3 levels.
Main floor has open lounge with a stone fireplace, dining area,
up-to-date serviced kitchen and a leader's room. Lower level has
individual rooms with bunk beds that can sleep 28 people and a
small meeting room. Upper loft has 2 areas that sleep 12.
<br>
Central heating, 3 flush toilets, 3 showers, and can accommodate
up to 40 people. There are
dishes, cutlery & pots and pans. </font></li>
<li>
<b><font size="2">Annikki</font></b><font size="2"><b> Snow
</b>- Accomodates 20. Rustic log cabin (24 x 24 ) open concept
structure. Main floor has kitchen, dining area and leisure
area. Upper loft for sleeping. No bunks so come
self-contained. Basement has open area and a 2-piece bathroom.
Kitchen has modern appliances. Cabin is heated and also has a
wood burning stove. There are dishes, cutlery & pots
and pans. </font>
</li>
<li>
<b><font size="2">On site resources </font></b>
<ul>
<li><font size="2">Climbing wall & aerial runway (must
be pre-arranged) Please contact Rick Johnston </font>
<span class="850325021-22052004">
<font face="Arial" size="2">519-756-3065 for arrangements.</font></span></li>
<li>
<font size="2">picnic shelter </font> </li>
<li>
<font size="2">camping areas </font> </li>
<li>
<font size="2">camp fire area </font> </li>
<li>
<font size="2">chapel area </font> </li>
<li>
<font size="2">hiking within camp or in
countryside </font> </li>
<li>
<font size="2">climbing wall (must be
pre-arranged.) </font> </li>
<li>
<font size="2">volleyball area </font> </li>
<li>
<font size="2">baseball diamond </font>
</li>
<li>
<font size="2">3 adirondack shelters </font>
</li>
<li>
<font size="2">winter sports - cross
country skiing, snowshoeing,
tobogganing </font> </li>
</ul>
</li>
<li>
<font size="2">Recreation equipment
available</font><ul>
<li>
<font size="2">snowshoes, volleyball
and net; baseball equipment, archery
equipment, soccer balls, bull horns,
frisbees, pa system - outdoor </font>
</li>
</ul>
</li>
<li>
<font size="2">Firewood available for
on-site use </font> </li>
</ul>
<ul>
<li>
<font size="2">
<font color="#FF0000">
<a href="../camppictures/Impeesa/ImpeesaPictures.htm">PHOTO GALLERY</a></font> FOR Camp Impeesa </font>
</li>
<li>
<font size="2">Check out time is by
12 noon Sunday. Ranger will inspect
building for clean-up and then re
lock building. </font> </li>
<li>
<font size="2">Garbage Dumpster is
for regular garbage...All
recyclables please take with you.
</font>
</li>
<li>
<div>
<font face="Arial" size="2">
<em>Check-in is after 4 pm on
Friday and check-out is by 1
pm on Sunday. We cannot
guarantee that we can
accomodate earlier arrivals or
later departures. Excessive
use beyond these times may
result in extra user fees.</em></font></div>
</li>
<li>
<font size="2">No driving down
to camp sites. Carry gear in.
4 wagon carts for use. </font>
</li>
</ul>
<p>
<a href="../DIRECTIONS/Directions-CampImpeesa.htm">DIRECTIONS to Camp Impeesa</a><p>
<b>911#
<span style="background-color: #FFFF00">
827559</span> Township Rd #8<br>
Blandford-Blenheim Township</b><blockquote>
<ul>
<li> # <font size="2">519-632-7606</font></li>
</ul>
</blockquote>
</td>
</tr>
<tr>
<td valign="top" height="536" bordercolorlight="#663366" bordercolordark="#663366" width="809" colspan="2">
<p><span lang="en-us"><a name="FEE"></a>FEE SC</span>HEDULE</p>
<table border="1" width="478">
<tr>
<td bgcolor="#000000" width="83"><font size="1" color="#FFFFFF"><b>SITE</b></font></td>
<td bgcolor="#000000" width="208">
<font size="1" color="#FFFFFF"><b>SCOUTING </b></font></td>
<td bgcolor="#000000" width="104">
<span lang="en-us"><font size="1" color="#FFFFFF"><b>GUIDING</b></font></span></td>
<td bgcolor="#000000" width="100">
<font size="1" color="#FFFFFF"><b>
NON-SCOUTING</b></font></td>
</tr>
<tr>
<td valign="top" width="83"> </td>
<td valign="top" width="104"> </td>
<td valign="top" width="104"> </td>
<td valign="top" width="100"> </td>
</tr>
<tr>
<td valign="top" width="83"><font size="1">Beaver Lodge</font></td>
<td valign="top" width="104"><font size="1">$<span lang="en-us">300an</span></font></td>
<td valign="top" width="104"><font size="1">$300 + gst = $321</font></td>
<td valign="top" width="100"><font size="1">$425+gst = $454.75</font></td>
</tr>
<tr>
<td valign="top" width="83"><font size="1">Beaver Lodge Colony 1 night</font></td>
<td valign="top" width="104"><font size="1">$150</font></td>
<td valign="top" width="104"> </td>
<td valign="top" width="100"> </td>
</tr>
<tr>
<td valign="top" width="83"><font size="1">Annikki Snow</font></td>
<td valign="top" width="104"><font size="1">$1<span lang="en-us">90</span></font></td>
<td valign="top" width="104"><font size="1">$190 + gst = $203.30</font></td>
<td valign="top" width="100"><font size="1">$265 + gst = $283.55</font></td>
</tr>
<tr>
<td valign="top" width="83"><font size="1">Annikki Snow Colony 1 night</font></td>
<td valign="top" width="104"><font size="1">$100</font></td>
<td valign="top" width="104"> </td>
<td valign="top" width="100"> </td>
</tr>
<tr>
<td valign="top" width="83"><font size="1">Picnic Shelter</font></td>
<td valign="top" width="104"><font size="1">$50 per day / $80 per weekend</font></td>
<td valign="top" width="104"><font size="1">$50 per day + gst = $53.50
</font>
<p><font size="1">$80 per weekend + gst = $85.60 </font></td>
<td valign="top" width="100"><font size="1">$70 per day + gst = $74.90</font><p>
<font size="1">$100
per weekend + gst = $107</font></td>
</tr>
<tr>
<td valign="top" width="83"><font size="1">Camping </font></td>
<td valign="top" width="104"><font size="1">$<span lang="en-us">2</span>.00<span lang="en-us">
per person per night</span></font></td>
<td valign="top" width="104"><font size="1">$2 per person per night</font></td>
<td valign="top" width="204"><font size="1">$5 per person per night + gst =
$5.35</font></td>
</tr>
<tr>
<td valign="top" width="83"><font size="1">Adirondack</font></td>
<td valign="top" width="104"><font size="1">$20 per night plus
camping fee</font></td>
<td valign="top" width="104"><font size="1">$20 per night plus
camping fee</font></td>
<td valign="top" width="204"><font size="1">$30 per night plus
camping fee</font></td>
</tr>
<tr>
<td valign="top" width="83"><font size="1">Evening meetings (any
building)</font></td>
<td valign="top" width="104"><font size="1">$<span lang="en-us">25</span></font></td>
<td valign="top" width="104"><font size="1">$25 plus gst</font></td>
<td valign="top" width="204"><font size="1">$50 plus gst</font></td>
</tr>
<tr>
<td valign="top" width="83"><span lang="en-us"><font size="1">
Crests</font></span></td>
<td valign="top" width="104"><span lang="en-us"><font size="1">
$3.00</font></span></td>
<td valign="top" width="104"> </td>
<td valign="top" width="204"> </td>
</tr>
<tr>
<td valign="top" width="83"><span lang="en-us"><font size="1">
Area events </font></span></td>
<td valign="top" width="104"><span lang="en-us"><font size="1">
$1</font></span><font size="1">.00<span lang="en-us"> per person
per night</span></font></td>
<td valign="top" width="104"> </td>
<td valign="top" width="204"> </td>
</tr>
</table>
<p> </td>
</tr>
</table>
</form>
<body onUnload="CheckWindow();" onload="dynAnimation()">
</body>
</html>
|
|
|
|
BeTheBall
Posts: 6385 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Need some advice on how to - 6/1/2005 21:41:24
Do you have a link you can share?
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
rikki
Posts: 388 Joined: 4/4/2004 Status: offline
|
RE: Need some advice on how to - 6/1/2005 22:12:18
Camp Impeesa
|
|
|
|
BeTheBall
Posts: 6385 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Need some advice on how to - 6/1/2005 22:20:01
Hope I am not being difficult, but as far as I can tell I can enter whatever I want in the date fields. Didn't you say you had a script that made sure the date was valid? Also, if the camp is closed on Mondays and Tuesdays, what will happen if the user enters a start date that is say a Wednesday and an end date that is the next wednesday? Are you needing to also ensure that none of the dates in between are Mondays or Tuesdays?
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
rikki
Posts: 388 Joined: 4/4/2004 Status: offline
|
RE: Need some advice on how to - 6/2/2005 9:41:38
quote:
Are you needing to also ensure that none of the dates in between are Mondays or Tuesdays? Yes... At no time can they book a Monday or Tuesday... What I'd like to happen in the case you mentioned above is it will block them from booking and come up with an error that says you cannot book the camp on a Monday or Tuesday...
|
|
|
|
BeTheBall
Posts: 6385 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Need some advice on how to - 6/2/2005 10:03:57
OK, so am I correct in stating that the longest a person can book is 5 days? Otherwise they run into a Monday or Tuesday, right?
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
rikki
Posts: 388 Joined: 4/4/2004 Status: offline
|
RE: Need some advice on how to - 6/2/2005 10:28:06
quote:
ORIGINAL: BeTheBall OK, so am I correct in stating that the longest a person can book is 5 days? Otherwise they run into a Monday or Tuesday, right? quote:
OK, so am I correct in stating that the longest a person can book is 5 days? Yes.. that's correct... The norm is to book weekends.. but you are correct..
|
|
|
|
BeTheBall
Posts: 6385 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Need some advice on how to - 6/2/2005 10:36:10
Should be doable. I am on my way out the door to work. I will get back with you later today.
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
rikki
Posts: 388 Joined: 4/4/2004 Status: offline
|
RE: Need some advice on how to - 6/4/2005 21:41:49
Hi Duane I tried it after fighting with the IIS server on my machine.. when I tested it, it let through a booking that it shouldn't have.. For example I entered 6/12/2005 to 6/14/2005. The 14th is a Tuesday so it should have rejected it... Any ideas.. .? Sarah
|
|
|
|
BeTheBall
Posts: 6385 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Need some advice on how to - 6/5/2005 0:39:34
Odd, I just tried the same dates on my copy and it alerted me that the camp is closed Mondays and Tuesdays and to please enter another ending date. Did you change anything?
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
rikki
Posts: 388 Joined: 4/4/2004 Status: offline
|
RE: Need some advice on how to - 6/5/2005 18:10:04
Duane I just downloaded the file again, opened it in IE and the when I enter a date.. and click.. I get nothing.. It doesn't go anywhere?? I'm opening it as an htm page not asp... does that make a difference?
|
|
|
|
BeTheBall
Posts: 6385 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Need some advice on how to - 6/5/2005 18:24:24
No, I assumed it would be htm not asp. If you enter bad dates, such as a Monday or Tuesday or a date in the past do you get the alert or not?
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
rikki
Posts: 388 Joined: 4/4/2004 Status: offline
|
RE: Need some advice on how to - 6/5/2005 18:54:23
Hi again... I did get it to work to get the warning... I'm using the iis server to test... Haven't uploaded yet. But when I enter a legitimate date and click it doesn't do anything... There's something weird with the setup of my IIS... Sometimes it works and sometimes it doesn't.... S
|
|
|
|
BeTheBall
Posts: 6385 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Need some advice on how to - 6/5/2005 19:06:40
Don't think it's your IIS. See if this one works better.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-ca">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>CAMP IMPEESA</title>
<script language="Javascript">
</script>
<script language="JavaScript" fptype="dynamicanimation">
<!--
function dynAnimation() {}
function clickSwapImg() {}
//-->
</script>
<script language="JavaScript1.2" fptype="dynamicanimation" src="animate.js">
</script>
<script language = "Javascript">
/**
* DHTML date validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
*/
// Declaring valid date character, minimum year and maximum year
var dtCh= "/";
var minYear=1900;
var maxYear=2100;
function isInteger(s){
var i;
for (i = 0; i < s.length; i++){
// Check that current character is number.
var c = s.charAt(i);
if (((c < "0") || (c > "9"))) return false;
}
// All characters are numbers.
return true;
}
function stripCharsInBag(s, bag){
var i;
var returnString = "";
// Search through string's characters one by one.
// If character is not in bag, append to returnString.
for (i = 0; i < s.length; i++){
var c = s.charAt(i);
if (bag.indexOf(c) == -1) returnString += c;
}
return returnString;
}
function daysInFebruary (year){
// February has 29 days in any year evenly divisible by four,
// EXCEPT for centurial years which are not also divisible by 400.
return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 );
}
function DaysArray(n) {
for (var i = 1; i <= n; i++) {
this = 31
if (i==4 || i==6 || i==9 || i==11) {this = 30}
if (i==2) {this = 29}
}
return this
}
function isDate(dtStr){
var daysInMonth = DaysArray(12)
var pos1=dtStr.indexOf(dtCh)
var pos2=dtStr.indexOf(dtCh,pos1+1)
var strMonth=dtStr.substring(0,pos1)
var strDay=dtStr.substring(pos1+1,pos2)
var strYear=dtStr.substring(pos2+1)
strYr=strYear
if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1)
if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1)
for (var i = 1; i <= 3; i++) {
if (strYr.charAt(0)=="0" && strYr.length>1) strYr=strYr.substring(1)
}
month=parseInt(strMonth)
day=parseInt(strDay)
year=parseInt(strYr)
if (pos1==-1 || pos2==-1){
alert("The date format should be : mm/dd/yyyy")
return false
}
if (strMonth.length<1 || month<1 || month>12){
alert("Please enter a valid month")
return false
}
if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){
alert("Please enter a valid day")
return false
}
if (strYear.length != 4 || year==0 || year<minYear || year>maxYear){
alert("Please enter a valid 4 digit year between "+minYear+" and "+maxYear)
return false
}
if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){
alert("Please enter a valid date")
return false
}
return true
}
function ValidateForm(){
var dt=document.form1.DateStart
var dt2=document.form1.DateEnd
var today = new Date()
if (isDate(dt.value)==false){
dt.focus()
return false}
if (isDate(dt2.value)==false){
dt2.focus()
return false}
var weekDay = new Date(document.form1.DateStart.value)
var weekDay2 = new Date(document.form1.DateEnd.value)
var one_day=1000*60*60*24
if(Math.ceil((weekDay.getTime()-today.getTime())/one_day) < 0){
alert("The start date you entered is in the past. Please enter a future date.")
dt.value=""
dt.focus()
return false}
if(Math.ceil((weekDay2.getTime()-weekDay.getTime())/one_day) < 0){
alert("Your end date is before your start date. Please revise.")
dt2.value=""
dt2.focus()
return false}
if((weekDay.getDay()==1)||(weekDay.getDay()==2)){
alert("The camp is closed on Mondays and Tuesdays. Please choose another start day.")
dt.value=""
dt.focus()
return false}
if((weekDay2.getDay()==1)||(weekDay2.getDay()==2)){
alert("The camp is closed on Mondays and Tuesdays. Please choose another ending day.")
dt2.value=""
dt2.focus()
return false}
if(((weekDay.getDay()==3) && (Math.ceil((weekDay2.getTime()-weekDay.getTime())/one_day) > 5))||((weekDay.getDay()==4) && (Math.ceil((weekDay2.getTime()-weekDay.getTime())/one_day) > 4))||((weekDay.getDay()==5) && (Math.ceil((weekDay2.getTime()-weekDay.getTime())/one_day) > 3))||((weekDay.getDay()==6) && (Math.ceil((weekDay2.getTime()-weekDay.getTime())/one_day) > 2))||((weekDay.getDay()==0) && (Math.ceil((weekDay2.getTime()-weekDay.getTime())/one_day) > 1))){
alert("The camp is closed on Mondays and Tuesdays. Please revise your start and end days so as to not include a Monday or Tuesday.")
dt.value=""
dt2.value=""
dt.focus()
return false}
return true
}
</script>
<meta name="Microsoft Theme" content="copy-of-blends3 1111">
</head>
<body onload="dynAnimation()">
<form method="POST" name="form1" action="4DateQuery_Imp.asp" onsubmit="ValidateForm();">
<table border="0" width="813" cellpadding="0" style="border-color:#00CCFF; border-collapse: collapse" cellspacing="1" height="1607">
<tr>
<td width="809" colspan="2" height="59">
<p><font size="5"><b>CAMP IMPEESA</b></font></td>
</tr>
<tr>
<td width="221" height="63">
<p><font size="1">PLEASE <span lang="en-us">ENTER THE START AND END DATE OF YOUR
CAMP</span><br>
The system will check the date<span lang="en-us">s</span> and show you which sites are available.</font></p>
</td>
<td width="586" height="63">Fee Schedule
<a dynamicanimation="fpAnimformatRolloverFP1" fprolloverstyle="font-weight: bold" onmouseover="rollIn(this)" onmouseout="rollOut(this)" language="Javascript1.2" href="#FEE">click here
</a>
<br>
<span lang="en-us">Review sites </span>already booked <span lang="en-us">for</span><a href="../BookingReview/1BookingsIMPNEW.asp">
IMPEESA </a><p></td>
</tr>
<tr>
<td valign="top" bgcolor="#9CCFFF" bordercolorlight="#663366" bordercolordark="#663366" width="221" height="945"><font face="Arial" size="2">
<pre><font face="Arial">Start Date <input type="text" name="DateStart" size="11" maxlength="11">
End Date <input type="text" name="DateEnd" size="11" maxlength="11"></font>
</pre>
<p><font size="2">Format should be <br>
<span lang="en-us">mm/dd/yyyy</span></font></p>
| |