...

View Full Version : Help With Object Expected Error



Basscyst
12-23-2003, 07:01 AM
Figures. Right after I post I figure it out.

Thanks Any Way.

Basscyst

fredmv
12-23-2003, 07:05 AM
<html>
<head>
<script language="javascript">
var fso=new ActiveXObject('Scripting.FileSystemObject');
function getDays()
{
var y="2004"
var days_im=new Array(31,28,31,30,31,30,31,30,31,30,31,31);

myDays=new Array();
for(i=0;i<days_im.length;i++)
{
m=i+1;
myDays[i]=new Array();
for(j=0;j<days_im[i];j++)
{
d=j+1
myDays[i][j]=(m+"-"+d+"-"+y);
}
}
}

function displayShifts(cue)
{
alert('');
var sMonth=document.getElementById('fMonth1').options[document.getElementById('fMonth1').selectedIndex].value;
var sDay=document.getElementById('fDay1').options[document.getElementById('fDay1').selectedIndex].value;
heading.innerHTML=("<table><thead><th>Now Showing Slots For: " + myDays[sMonth][sDay]+"</th></table><br>");
var q="T";
display.innerHTML="<form id=\"list\"><table id='main'><thead><th>Selection<th>Time</th><th>Status</th></thead>"+
"<tr>"+
"<td><input type='checkbox' id='opt0' value='"+sMonth+q+sDay+0+cue+"'></td>"+
"<td>Morning</td>"+
"<td id='td1'>Available</td></tr>"+
"<tr>"+
"<td><input type='checkbox' id='opt1' value='"+sMonth+q+sDay+1+cue+"'></td>"+
"<td>Morning</td>"+
"<td id='td2'>Available</td></tr>"+
"<tr>"+
"<td><input type='checkbox' id='opt2' value='"+sMonth+q+sDay+2+cue+"'></td>"+
"<td>Mid-Day</td>"+
"<td id='td3'>Available</td></tr>"+
"<tr>"+
"<td><input type='checkbox' id='opt3' value='"+sMonth+q+sDay+3+cue+"'></td>"+
"<td>Mid-Day</td>"+
"<td id='td4'>Available</td></tr>"+
"<tr>"+
"<td><input type='checkbox' id='opt4' value='"+sMonth+q+sDay+4+cue+"'></td>"+
"<td>Night</td>"+
"<td id='td5'>Available</td></tr>"+
"<tr>"+
"<td><input type='checkbox' id='opt5' value='"+sMonth+q+sDay+5+cue+"'></td>"+
"<td>Night</td>"+
"<td id='td6'>Available</td></tr></table></form>";
}

onload = getDays;
</script>
</head>
<body>
<form>
<table border="0" cellspacing="0">
<thead>
<th>Search By Day:</th>
<th>OR</th>
<th>Search By Month:</th>
</thead>
<tr>
<td>
<select id="fMonth1">
<option selected>
<option value="0">1</option>
<option value="1">2</option>
<option value="2">3</option>
<option value="3">4</option>
<option value="4">5</option>
<option value="5">6</option>
<option value="6">7</option>
<option value="7">8</option>
<option value="8">9</option>
<option value="9">10</option>
<option value="10">11</option>
<option value="11">12</option>
</select>
<select id="fDay1" onchange="displayShifts('m');">
<option selected>
<option value="0">1</option>
<option value="1">2</option>
<option value="2">3</option>
<option value="3">4</option>
<option value="4">5</option>
<option value="5">6</option>
<option value="6">7</option>
<option value="7">8</option>
<option value="8">9</option>
<option value="9">10</option>
<option value="10">11</option>
<option value="11">12</option>
<option value="12">13</option>
<option value="13">14</option>
<option value="14">15</option>
<option value="15">16</option>
<option value="16">17</option>
<option value="17">18</option>
<option value="18">19</option>
<option value="19">20</option>
<option value="20">21</option>
<option value="21">22</option>
<option value="22">23</option>
<option value="23">24</option>
<option value="24">25</option>
<option value="25">26</option>
<option value="26">27</option>
<option value="27">28</option>
<option value="28">29</option>
<option value="29">30</option>
<option value="30">31</option>
</select>
<select id="fYear1">
<option>2004</option>
</select>
</td>
<td>
</td>
<td>
<select id="fMonth2">
<option selected>
<option value="0">1</option>
<option value="1">2</option>
<option value="2">3</option>
<option value="3">4</option>
<option value="4">5</option>
<option value="5">6</option>
<option value="6">7</option>
<option value="7">8</option>
<option value="8">9</option>
<option value="9">10</option>
<option value="10">11</option>
<option value="11">12</option>
</select>
<select id="fyear2">
<option>2004</option>
</select>
</td>
</tr>
</table>
</form>
<div id="heading">
</div>
<div id="display">
</div>
</body>
</html>

Basscyst
12-23-2003, 07:08 AM
Thanks Fredmv,

Seems it was staring right at me. :o)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum