Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Smokes a Lot
    Join Date
    Jul 2003
    Location
    CA, USA
    Posts
    1,594
    Thanks
    5
    Thanked 20 Times in 20 Posts

    Help With Object Expected Error

    Figures. Right after I post I figure it out.

    Thanks Any Way.

    Basscyst
    Last edited by Basscyst; 12-23-2003 at 06:06 AM.
    Helping to build a bigger box. - Adam Matthews

  • #2
    Regular Coder
    Join Date
    Jul 2003
    Location
    Massachusetts
    Posts
    472
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <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>

  • #3
    Smokes a Lot
    Join Date
    Jul 2003
    Location
    CA, USA
    Posts
    1,594
    Thanks
    5
    Thanked 20 Times in 20 Posts
    Thanks Fredmv,

    Seems it was staring right at me. )
    Helping to build a bigger box. - Adam Matthews


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •