Jump to content

[SOLVED] Getting yellow error triangle in bottom left in IE


dc_jt

Recommended Posts

Hi

 

I have the following script, however when I open this page in IE I get the yellow triangle in the bottom left with the exclamation mark in that says Done, but with errors on the page. When I click the details of the error it says:

 

Line:222

Char: 6

Error: 'document.r.dayweek' is null or not an object

Code: 0

 

Any idea how to fix this? Here is my code: Thanks

 

<?php
//session_start();
require_once $_SERVER['DOCUMENT_ROOT'].'/code_inc/config.inc.php'; 
require_once(DB_CONNECT);
require_once(LOCAL_CLASSES.'/venues/RCLVenues.class.php');
require_once(LOCAL_CLASSES.'/venues/RCLOpeningHours.class.php');
require_once(LOCAL_CLASSES.'/venues/RCLPromos.class.php');
require_once(LOCAL_CLASSES.'/venues/RCLMenuItems.class.php');
require_once(LOCAL_CLASSES.'/venues/RCLMenus.class.php');

// make objects
$objRCLVenues = new RCLVenues($db);
$objRCLOpeningHours = new RCLOpeningHours($db);
$objRCLPromos = new RCLPromos($db);
$objRCLMenuItems = new RCLMenuItems($db);
$objRCLMenus = new RCLMenus($db);

// get data
$venue = $objRCLVenues->get($_REQUEST['venue_id']);
$weekdays = $objRCLOpeningHours->getWeek($venue_id);
$specdays = $objRCLOpeningHours->getAllSpecial($venue_id);
$promos = $objRCLPromos->getPromos($venue_id);
$menu_items = $objRCLMenuItems->getAllVenue($venue_id);
$menus = $objRCLMenus->getAllVenue($_GET['venue_id']);
$flashInfo = $objRCLVenues->GetRandomInfoForFlash($_GET['venue_id']);


?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Copyright 2007, Rippleffect Studio Ltd. (3871086). All rights reserved -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="Black House Grills" />
<meta name="Description" content="Black House Grills" />
<meta name="Keywords" content="Black House Grills" />
<meta name="robots" content="index,follow" />
<title>Black House Grills - The Blackhouse venues in the North West</title>
<link href="/assets/css/blackhouse.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="/assets/css/print.css" rel="stylesheet" type="text/css" media="print"/>
<script type="text/javascript" src="/js/embed.js"></script>
<script type="text/javascript" src="/js/AC_OETags.js"></script>
<script type="text/javascript" src="/js/embedFlashObjects.js"></script>
</head>
<body>
<div id="outer">
<div id="leftimage"><script type="text/javascript">createControl('464', '434', '/assets/flash/homepage.swf?sImageNames=<?=$flashInfo?>', '/assets/flash/homepage.jpg', 'Blackhouse Grills');</script></div>
<?php if($venue['picture_vl'] != ''){?>
	<div id="logo"><img src="<?=VENUES_IMAGES.'/'.$venue['picture_vl']?>" alt="<?=$venue['name']?>"></div>
<?php } else {?>
	<? include($_SERVER['DOCUMENT_ROOT']."/includes/logo.inc.php"); ?>
<?php }?>
<div id="contentcolumn">
	<h1><?=$venue['name']?></h1>
	<p>General Manager: <?=$venue['general_manager']?><br />
	Head Chef: <?=$venue['head_chef']?><br />
	Unit PA: <?=$venue['unit_pa']?></p>
	<? if ($menus) { // keep blank if no promos set ?>
	<? 	while($row=mysql_fetch_array($menus)) {?>
	<div class="greybox">
		<p class="menu"><a href="<?=MENUS.'/'.$row['menu_file']?>" target="_blank"><?=$row['name']?></a></p>
		</div>
	<?php } ?>
	<?php } ?>
	<!--
	<?php if($venue['menu']){?>
	<div class="greybox">
		<p class="menu"><a href="/download_menu.php?venue_id=<?=$venue['id']?>">Download the menu</a></p>
	</div>
	<?php }?>
	-->
	<div class="greybox">
		<h1>Online Reservations</h1>
		<?
			require_once($_SERVER['DOCUMENT_ROOT'].'/reservations.config.inc.php');
			foreach($bars_with_reservations as $bar_id=>$reservation_bar_id){
			if($bar_id == $_GET['venue_id']){
			//if ($_GET['venue_id'] == 60 || $_GET['test'] == 1)
			//{
		?>	
		<div class="left">
			<!-- Begin Open Table Reservation Form -->
			<form name="r" method="post" action="http://www.opentable.com/interim.asp?ref=639" target="_blank" >
		  	<input type="hidden" name="RestaurantID" value="<?=$reservation_bar_id?>" />
			<input type="hidden" name="restref" value="<?=$reservation_bar_id?>" />
			<input type="hidden" name="SearchType" value="RestaurantID" />
			<input type="hidden" name="GeoID" value="0" />
			<div class="row">
				<span class="label"><label for="partysize">Party Size:</label></span>
				<span class="formelement">
					<select name="PartySize" id="partysize" class="formdropdown" >
			  			<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>
		    		</select>
				</span>
			</div>
			<div class="row">
		  		<span class="label"><label for="dateday">Date:</label></span>
				<span class="formelement">
					<select name="ResMonth" onchange="ShowDay()" id="dateday" class="formdropdown">
				 	<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 name="ResDate" onchange="ShowDay()" id="datemonth" class="formdropdown">
				  	<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 name="ResYear" onchange="ShowDay()" class="formdropdown">
					<option value="2007">2007</option>
					<option value="2008">2008</option>
					<option value="2009">2009</option>
					<option value="2010">2010</option>
					<option value="2011">2011</option>
					<option value="2012">2012</option>
					<option value="2013">2013</option>
					<option value="2014">2014</option>
					<option value="2015">2015</option>
					<option value="2016">2016</option>
					<option value="2017">2017</option>
					<option value="2018">2018</option>
					<option value="2019">2019</option>
					<option value="2020">2020</option>
		    		</select>
				</span>
			</div>
			<div class="row">
		  		<span class="label"><label for="timehour">Time:</label></span>
				<span class="formelement">
					<select name="ResHour" id="timehour" class="formdropdown">
				  	<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>
		    		</select>
					<select name="ResMinute" id="timeminute" class="formdropdown">
				  	<option value="0">:00</option>
					<option value="15">:15</option>
					<option value="30">:30</option>
					<option value="45">:45</option>
		    		</select>
					<select name="Meridian" id="timeam" class="formdropdown">
				 	<option value="AM">AM</option>
					<option value="PM">PM</option>
		    		</select>
				</span>
			</div>
			<div class="row">
				<input name="submit" type="submit" class="formbutton" id="submit" src="http://www.opentable.com/img/base/search.gif" />
				<input name="Process" type="hidden" value="Find" />
				<input name="Referrer" type="hidden" value="single.asp" />
				<input type="hidden" name="save" value="true" />
			</div>
			</form>
		</div>
	</div>
</div>
<script language="javascript" type="text/javascript">
<!--


			/*******************************************
			Script used to display current date.
			********************************************/
			function addToArray(ar, str)
			{
				var l
				l = ar[0] + 1
				ar[l] = str
				ar[0] = l
			}
			function makeArray()
			{
				array = new Object();
				array[0] = 0;
				return array;
			}

			var dayNames = makeArray()
			addToArray(dayNames, " Sun")
			addToArray(dayNames, " Mon")
			addToArray(dayNames, " Tue")
			addToArray(dayNames, " Wed")
			addToArray(dayNames, " Thu")
			addToArray(dayNames, " Fri")
			addToArray(dayNames, " Sat")

			function ShowDay() {
				var ryear = document.r.ResYear.selectedIndex;
				if(ryear < 0)
					ryear= 0;
				ryear= document.r.ResYear.options[ryear].value - 0;
				var rmonth = document.r.ResMonth.selectedIndex;
				var rdate = document.r.ResDate.selectedIndex + 1;
				var rnow = new Date(ryear,rmonth,rdate);
				var now = new Date();

				var rday = rnow.getDay() + 1;
				document.r.dayweek.value = dayNames[rday]

			}



			function setDate() {

				// extract date from literal..
				var now = new Date();
				var closestTime = (now.getTime() + (30 * 60000)); //1/2 hour in advance...
				var nearest = new Date(closestTime)
				var nearmonth = nearest.getMonth();
				var neardate = nearest.getDate();
				var nearyear = nearest.getFullYear();

				document.r.ResMonth.selectedIndex = nearmonth
				document.r.ResDate.selectedIndex = neardate - 1
				document.r.ResYear.selectedIndex = nearyear-2005;
			}

			setDate();
			ShowDay();


			--></script>
<?
}}//end if venue_id
?>
<? include($_SERVER['DOCUMENT_ROOT']."/includes/nav.inc.php"); ?>
</div>
</body>
</html>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.