J
James Walker
Can some one help I get an error of 'checkIndate' is null or not an object
can someone please help. I can't work out why
Thanks in advance
James
<form>
<td height="24" colspan="7" valign="top"><form name="booknow"><select
name="checkInDate" class="f11">
<option value="1" >1</option>
<option value="2" >2</option>
<option value="3" >3</option>
<option value="4" >4</option>
<option value="5" >5</option>
<option value="6" >6</option>
<option value="7" >7</option>
<option value="8" >8</option>
<option value="9" >9</option>
<option value="10" >10</option>
<option value="11" >11</option>
<option value="12" >12</option>
<option value="13" >13</option>
<option value="14" >14</option>
<option value="15" >15</option>
<option value="16" >16</option>
<option value="17" >17</option>
<option value="18" >18 </option>
<option value="19" >19</option>
<option value="20" >20</option>
<option value="21">21</option>
<option value="22" >22</option>
<option value="23" >23</option>
<option value="24">24</option>
<option value="25" >25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28" >28</option>
<option value="29 ">29</option>
<option value="30" >30</option>
<option value="31" >31</option>
</select>
<select id="month" class="f11">
<option value="1" >Jan</option>
<option value="2" >Feb</option>
<option value="3">Mar</option>
<option value="4" >Apr</option>
<option value="5" >May</option>
<option value="6" >Jun</option>
<option value="7" >Jul</option>
<option value="8" >Aug</option>
<option value="9" >Sep</option>
<option value="10" >Oct</option>
<option value="11" >Nov</option>
<option value="12" >Dec</option>
</select>
<select id="year" class="f11">
<option value="03" >2003</option>
<option value="04" >2004</option>
<option value="05" >2005</option>
<option value="06" >2006</option>
</select>
</td>
</tr>
<tr>
<td width="44" height="15" valign="top"><strong>Adults</strong></td>
<td width="15"></td>
<td width="50" valign="top"><strong>Nights</strong></td>
<td width="15"></td>
<td colspan="2" valign="top"><strong>Rooms</strong></td>
<td width="11"></td>
</tr>
<tr>
<td height="29" colspan="2" valign="top"><select id="adults"
class="f11">
<option value="1" >1</option>
<option value="2" >2</option>
<option value="3" >3</option>
<option value="4" >4</option>
<option value="5" >5</option>
<option value="6" >6</option>
<option value="7" >7</option>
</select></td>
<td valign="top"><select id="nights" class="f11">
<option value="1" >1</option>
<option value="2" >2</option>
<option value="3" >3</option>
<option value="4" >4</option>
<option value="5" >5</option>
<option value="6" >6</option>
<option value="7" >7</option>
</select></td>
<td> </td>
<td colspan="2" valign="top"><select id="rooms" class="f11">
<option value="1" >1</option>
<option value="2" >2</option>
<option value="3" >3</option>
<option value="4" >4</option>
<option value="5" >5</option>
<option value="6" >6</option>
<option value="7" >7</option>
</select></td>
</form>
<td></td>
</tr>
<tr>
<td height="20"></td>
<td></td>
<td></td>
<td> </td>
<td width="42" valign="top"><input type=submit value="Go!"
onclick="doURL()">
<script language="JavaScript">
function doURL()
{
var theForm=document.booknow;
var checkInDate=theForm.checkIndate[checkInDate.selectedIndex].value;
var checkInMonth=theForm.month[month.selectedIndex].value;
var checkInYear=theForm.year[year.selectedIndex].value;
var
numberOfNights=theForm.nights[nights.selectedIndex].value;
var numberOfAdults=theForm.adults[adults.selectedindex].value;
var numberOfRooms=theForm.rooms[rooms.selectedIndex].value;
t= "http://www.ichotelsgroup.com/redirect?checkInDatebrandCode=6c"+
"&path=asearch&city=London&countryId=0925&rateTypeCodes=6CBARC"+
"&checkInDate="+checkInDate+
"&checkInMonth="+month+
"&checkInYear="+year+
"&numberOfNights="+nights+
"&numberOfAdults="+adults+
"&numberOfRooms="+rooms+
"&hotelCode=LONLH"
window.open(t,"_blank","")
}
//-->
</script>
can someone please help. I can't work out why
Thanks in advance
James
<form>
<td height="24" colspan="7" valign="top"><form name="booknow"><select
name="checkInDate" class="f11">
<option value="1" >1</option>
<option value="2" >2</option>
<option value="3" >3</option>
<option value="4" >4</option>
<option value="5" >5</option>
<option value="6" >6</option>
<option value="7" >7</option>
<option value="8" >8</option>
<option value="9" >9</option>
<option value="10" >10</option>
<option value="11" >11</option>
<option value="12" >12</option>
<option value="13" >13</option>
<option value="14" >14</option>
<option value="15" >15</option>
<option value="16" >16</option>
<option value="17" >17</option>
<option value="18" >18 </option>
<option value="19" >19</option>
<option value="20" >20</option>
<option value="21">21</option>
<option value="22" >22</option>
<option value="23" >23</option>
<option value="24">24</option>
<option value="25" >25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28" >28</option>
<option value="29 ">29</option>
<option value="30" >30</option>
<option value="31" >31</option>
</select>
<select id="month" class="f11">
<option value="1" >Jan</option>
<option value="2" >Feb</option>
<option value="3">Mar</option>
<option value="4" >Apr</option>
<option value="5" >May</option>
<option value="6" >Jun</option>
<option value="7" >Jul</option>
<option value="8" >Aug</option>
<option value="9" >Sep</option>
<option value="10" >Oct</option>
<option value="11" >Nov</option>
<option value="12" >Dec</option>
</select>
<select id="year" class="f11">
<option value="03" >2003</option>
<option value="04" >2004</option>
<option value="05" >2005</option>
<option value="06" >2006</option>
</select>
</td>
</tr>
<tr>
<td width="44" height="15" valign="top"><strong>Adults</strong></td>
<td width="15"></td>
<td width="50" valign="top"><strong>Nights</strong></td>
<td width="15"></td>
<td colspan="2" valign="top"><strong>Rooms</strong></td>
<td width="11"></td>
</tr>
<tr>
<td height="29" colspan="2" valign="top"><select id="adults"
class="f11">
<option value="1" >1</option>
<option value="2" >2</option>
<option value="3" >3</option>
<option value="4" >4</option>
<option value="5" >5</option>
<option value="6" >6</option>
<option value="7" >7</option>
</select></td>
<td valign="top"><select id="nights" class="f11">
<option value="1" >1</option>
<option value="2" >2</option>
<option value="3" >3</option>
<option value="4" >4</option>
<option value="5" >5</option>
<option value="6" >6</option>
<option value="7" >7</option>
</select></td>
<td> </td>
<td colspan="2" valign="top"><select id="rooms" class="f11">
<option value="1" >1</option>
<option value="2" >2</option>
<option value="3" >3</option>
<option value="4" >4</option>
<option value="5" >5</option>
<option value="6" >6</option>
<option value="7" >7</option>
</select></td>
</form>
<td></td>
</tr>
<tr>
<td height="20"></td>
<td></td>
<td></td>
<td> </td>
<td width="42" valign="top"><input type=submit value="Go!"
onclick="doURL()">
<script language="JavaScript">
function doURL()
{
var theForm=document.booknow;
var checkInDate=theForm.checkIndate[checkInDate.selectedIndex].value;
var checkInMonth=theForm.month[month.selectedIndex].value;
var checkInYear=theForm.year[year.selectedIndex].value;
var
numberOfNights=theForm.nights[nights.selectedIndex].value;
var numberOfAdults=theForm.adults[adults.selectedindex].value;
var numberOfRooms=theForm.rooms[rooms.selectedIndex].value;
t= "http://www.ichotelsgroup.com/redirect?checkInDatebrandCode=6c"+
"&path=asearch&city=London&countryId=0925&rateTypeCodes=6CBARC"+
"&checkInDate="+checkInDate+
"&checkInMonth="+month+
"&checkInYear="+year+
"&numberOfNights="+nights+
"&numberOfAdults="+adults+
"&numberOfRooms="+rooms+
"&hotelCode=LONLH"
window.open(t,"_blank","")
}
//-->
</script>