Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

incorrect calculation of time when specific time is given.

Status
Not open for further replies.

manishblr1

Programmer
Dec 20, 2010
20
US
Hi ,
This screen is to add Time Period - Shift. To add a Time Period, the user should select an existing Production Calendar. Upon selecting a Production Calendar, a drop down will be displayed with all the available Time Period. When ‘Shift’ is selected from ‘Time Period’ drop down and clicked on ‘Add’ ‘Number of Periods’ (with default value 3) , ‘Time Period Description’ and ‘Start of First Shift’ labels will be displayed. user selects a value from SelectDays dropdown and enters start time in the HH:MM field and click on Create Shifts button. a table will be populated.

in the table the second column, 4th column will have time fields populated automatically depending on the time entered by the user in HH:MM.

for example if the user enters HH:MM as 10:00 and 3 in the no of periods field.
then (no of hours in day)/ no of periods
in this case it is 24/ 3 = 8 = no of hrs in each shift;
first shift starts at 10:00 ends at (10:00 + 8hrs)
second shift starts at(18:00) ends at (18:00+8 hrs)
third shift starts at(02:00) ends at (02:00+8 hrs)

Everthing is working fine except for few of the follwoing times:
00:00 to 01:59
18:00 to 09:59
16:00 to 17: 59
Code:
<HTML>
<Title> TimePeriod </Title>
<HEAD>
   	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<meta http-equiv="Expires" content="0"/>
	<meta http-equiv="Cache-Control" content="no-cache"/>
	<meta http-equiv="Pragma" content="no-cache"/>
	<link href="/XMII/CM/Testing_AA/Dashboard/CSS/Content.css" rel="stylesheet" type="text/css">
	<script language="javascript" src="/XMII/CM/Testing_AA/Dashboard/JS/UtilityFunctions.js" ></script>
	<script language="javascript" src="/XMII/CM/Testing_AA/Dashboard/JS/CommonFunctions.js" ></script>
</HEAD>
<script language="JavaScript">
var offSetArray = new Array();


offSetArray[0]= "Previous";
offSetArray[1]= "Current";
offSetArray[2]= "Next";

function populateOffSet(temp)
{
	for (i=0;i<offSetArray.length ;i++)
	{
		var opt = document.createElement("option");
		document.getElementById(temp).options.add(opt);
		opt.text = offSetArray[i];
		opt.value = offSetArray[i];
	}
}

var EndTime="";
function onlyNumbers(evt)
{
	var e = event || evt; // for trans-browser compatibility
	var charCode = e.which || e.keyCode;
//	allow only 1,2,3,4 numbers in timeperiod textbox
	if (!(charCode >= 49 && charCode<=52 ))
		return false;

	return true;
}

//function to reset few attributes related to Time Period
function resetTimePeriodattributes()
{
	document.getElementById('no_time_period_label').style.display = "none";
	document.getElementById('start_first_shift_label').style.display = "none";
	document.getElementById('btn_tp_Edit').disabled=false;
	document.getElementById('btn_tp_Delete').disabled=false;
	document.getElementById('add_submit_reset_btns_label').style.display = "none";
	document.getElementById('shift_timeperiod').style.display = "none";
//	document.getElementById('day_timeperiod').style.display = "none";
	document.getElementById('week_timeperiod').style.display = "none";
	document.getElementById('month_timeperiod').style.display = "none";
	document.getElementById('year_timeperiod').style.display = "none";
}

function NoOfPeriods()
{
	if(document.getElementById('time_period').value =="Shift")
	{
		document.getElementById('no_of_periods').value= 3;
		document.getElementById('no_of_periods').disabled=false;
		resetTimePeriodattributes();
	}
	else if(document.getElementById('time_period').value =="Day")
	{
		document.getElementById('no_of_periods').value= 24;
		document.getElementById('no_of_periods').disabled=true;
		resetTimePeriodattributes();
	}
	else if(document.getElementById('time_period').value =="Week")
	{
		document.getElementById('no_of_periods').value= 7;
		document.getElementById('no_of_periods').disabled=true;
		resetTimePeriodattributes();
	}
	else if(document.getElementById('time_period').value =="Month")
	{
		document.getElementById('no_of_periods').value= 1;
		document.getElementById('no_of_periods').disabled=true;
		resetTimePeriodattributes();
	}
	else if(document.getElementById('time_period').value =="Year")
	{
		document.getElementById('no_of_periods').value= 1;
		document.getElementById('no_of_periods').disabled=true;
		resetTimePeriodattributes();
	}
	else if(document.getElementById('time_period').value =="Select Time Period")
	{
		document.getElementById('no_of_periods').value= "";
		document.getElementById('no_of_periods').disabled=false;
		resetTimePeriodattributes();
	}
}

//Add button
function addTP()
{
	if(document.getElementById('time_period').value=="Select Time Period")
		alert("Please select a Time Period.");
	else if(document.getElementById('time_period').value=="Shift")
	{
		document.getElementById('btn_tp_Edit').disabled="true";
		document.getElementById('btn_tp_Delete').disabled="true";
		document.getElementById('no_time_period_label').style.display = "block";
		document.getElementById('start_first_shift_label').style.display = "block";
	}
	else  if(document.getElementById('time_period').value=="Day")
	{
		document.getElementById('btn_tp_Edit').disabled="true";
		document.getElementById('btn_tp_Delete').disabled="true";
		document.getElementById('no_time_period_label').style.display = "block";
		document.getElementById('start_first_shift_label').style.display = "block";
//		document.getElementById('day_timeperiod').style.display = "block";
//		document.getElementById('add_submit_reset_btns_label').style.display = "block";
//		populateOffSet("offSetStartTime");
//		populateOffSet("offSetEndTime");
	}
	else  if(document.getElementById('time_period').value=="Week")
	{
		document.getElementById('btn_tp_Edit').disabled="true";
		document.getElementById('btn_tp_Delete').disabled="true";
		document.getElementById('no_time_period_label').style.display = "block";
		document.getElementById('week_timeperiod').style.display = "block";
		document.getElementById('add_submit_reset_btns_label').style.display = "block";
		populateOffSet("offSetWeek");
		populateWeekDays("Week");
	}
	else  if(document.getElementById('time_period').value=="Month")
	{
		document.getElementById('btn_tp_Edit').disabled="true";
		document.getElementById('btn_tp_Delete').disabled="true";
		document.getElementById('no_time_period_label').style.display = "block";
		document.getElementById('month_timeperiod').style.display = "block";
		document.getElementById('add_submit_reset_btns_label').style.display = "block";
		populateOffSet("offSetMonth");
		populateDays1();
	}
	else 
	{
		document.getElementById('btn_tp_Edit').disabled="true";
		document.getElementById('btn_tp_Delete').disabled="true";
		document.getElementById('no_time_period_label').style.display = "block";
		document.getElementById('year_timeperiod').style.display = "block";
		document.getElementById('add_submit_reset_btns_label').style.display = "block";
		populateOffSet("offSetYear");
		populateMonths("Month");
		populateDays();
	}
}

//Submit button when Add is clicked
function addSubmit()
{
	alert("This is Add TP Section");

}

//Edit button
function editTP()
{
	if(document.getElementById('time_period').value=="Select Time Period")
		alert("Please select a Time Period.");
	else
		alert("Work under Progress");
}

//Delete button
function deleteTP()
{
	if(document.getElementById('time_period').value=="Select Time Period")
		alert("Please select a Time Period.");
	else
		alert("Work under Progress");
}

//Submit button when edit is clicked
function editSubmit()
{
	alert("This is Edit TP Section");
}


function viewTimePeriod()
{
	if(document.getElementById('appGetProductionCalendar').value == "Select Production Calendar")
		resetAll();
	else
	{
		document.getElementById('time_period_label').style.display = "block";
		document.getElementById('time_period').value="Select Time Period";
		resetTimePeriodattributes();
	}
}
	var shiftHourArray = new Array();
	var shiftDayArray = new Array();

//start of dynamic table creation 
function createTable()
{
	var testArray= new Array();
	testArray[0]=0;
	var tbl = document.getElementById('shiftTable');
	deleteTableLength= tbl.rows.length;
	while ( deleteTableLength>0){ 
 		document.getElementById('shiftTable').deleteRow(deleteTableLength-1);
 		deleteTableLength --;	
		}
	if(document.getElementById('time_period').value =="Day")
	{
		rowCount=1;	
	document.getElementById('day_timeperiod').style.display = "block";
	}
	else 
	{
		rowCount=document.getElementById('no_of_periods').value;
		document.getElementById('shift_timeperiod').style.display = "block";
	}
	Starttime=document.getElementById('shiftSH').value;
	if(validtime(Starttime))
	{
		document.getElementById('add_submit_reset_btns_label').style.display = "block";
		if(IsValidNumber(rowCount))
		{
		  var mytable = document.getElementById('shiftTable');
		var mytablebody = document.createElement("tbody");
		columnHeading = document.createElement("tr");
		startHourHeading = document.createElement("td");
		startHourHeading.innerText ="StartHour HH:MM";
		startHourHeading.setAttribute("colSpan","2"); 
		columnHeading.appendChild(startHourHeading);
		endHourHeading = document.createElement("td");
		endHourHeading.innerText ="EndHour HH:MM";
		endHourHeading.setAttribute("colSpan","2"); 
		columnHeading.appendChild(endHourHeading);
		labelHeading = document.createElement("td");
		labelHeading.innerText ="Label";
		columnHeading.appendChild(labelHeading);
                        mytablebody.appendChild(columnHeading);
     		 for(i = 0; i < rowCount; i++) {
            // creates a <tr> element
			eachRow = document.createElement("tr");
			cell0 = document.createElement("td");
			e0 = document.createElement("input");
			e0.setAttribute('type',"text");
			e0.name='offSetShiftST[]';	
			e0.id='offSetShiftST'+i;	
			e0.size = '12';
			e0.setAttribute('maxLength', 12);
			if(testArray[0] ==1)
			{
				tempvalue=document.getElementById('selectDays').selectedIndex;
				e0.value=offSetArray[tempvalue+1];
			}
			else
				e0.value=document.getElementById('selectDays').value;

			e0.disabled=true;			
			cell0.appendChild(e0);
			eachRow.appendChild(cell0);
			
			cell1 = document.createElement("td");
			e1 = document.createElement("input");
			e1.setAttribute('type',"text");
			e1.name='StartHour[]';	
			e1.id='StartHour'+i;	
			e1.size = '5';
			e1.setAttribute('maxLength', 5);
			if(shiftHourArray[i-1])
				e1.value=shiftHourArray[i-1];
			else
				e1.value=Starttime;
			testArray = endHourCal(testArray[0],e1.value);
			shiftHourArray[i] =testArray[1];
			e1.disabled=true;
			cell1.appendChild(e1);
			eachRow.appendChild(cell1);
			
			cell2 = document.createElement("td");
			e2 = document.createElement("input");
			e2.setAttribute('type',"text");
			e2.name='offSetShiftET[]';	
			e2.id='offSetShiftET'+i;	
			e2.size = '12';
			if(testArray[0] ==1)
			{
				tempvalue=document.getElementById('selectDays').selectedIndex;
				e2.value=offSetArray[tempvalue+1];
			}
			else
				e2.value=document.getElementById('selectDays').value;
			e2.setAttribute('maxLength', 12);
			e2.disabled=true;
			cell2.appendChild(e2);
			eachRow.appendChild(cell2);
			
			cell3 = document.createElement("td");
			e3 = document.createElement("input");
			e3.setAttribute('type',"text");
			e3.name = 'EndHour[]';
			e3.id='EndHour'+i;	
			e3.size = '5';
			e3.setAttribute('maxLength', 5);
			e3.value=shiftHourArray[i];
			e3.disabled=true;
			cell3.appendChild(e3);
			eachRow.appendChild(cell3);
			
			cell4 = document.createElement("td");
			e4 = document.createElement("input");
			e4.setAttribute('type',"text");
			e4.name='Label[]';	
			e4.id='Label'+i;	
			e4.size = '12';
			e4.setAttribute('maxLength', 12);
			cell4.appendChild(e4);
			eachRow.appendChild(cell4); 

			mytablebody.appendChild(eachRow);
			} 
        // appends <tbody> into <table>
        		mytable.appendChild(mytablebody);
        // appends <table> into <body>
//       		 mybody.appendChild(mytable);
		mytable.setAttribute("border", "2");
		}
	}
	else
		alert("Enter valid Time.");
}

///

 
function endHourCal(flag,startShiftTime)
{
	 var no_of_time_periods=document.getElementById('no_of_periods' ).value; 
	fieldArray = startShiftTime.split(":"); 
	 fieldArray[0]=parseInt(fieldArray[0]);
 	fieldArray[1]=parseInt(fieldArray[1]);	
	 var minutes =fieldArray[0]*60 + fieldArray[1]; 
	 var cal =parseInt((24/no_of_time_periods)*60); 
 	var Total,temp; 
 	Total=minutes+cal;     

	 if (Total>1440 ) 
  	 {              
	 	temp=Total-1440; 
	 	var totalSec=temp*60 
	 	var hr = parseInt( totalSec / 3600 ) % 24; 
 
 		var mm = parseInt( totalSec / 60 ) % 60; 
 		EndTime = ((hr < 10 ? "0"+hr : hr) +":"+ (mm < 10 ? "0" + mm : mm) );  
		flag=1;  
	} 
 	else if(Total< 1440) 
 	{
 		temp=Total; 
	 	var totalSec=temp*60; 
	 	var hr = parseInt( totalSec / 3600 ) % 24; 
 
 		var mm = parseInt( totalSec / 60 ) % 60; 
 		EndTime = ((hr < 10 ? "0"+hr : hr) +":"+ (mm < 10 ? "0" + mm : mm) ); 
	}  
	return [flag, EndTime];  
} 


function IsValidNumber(ipNum)
{
	if(isNaN(ipNum))
	{
		alert("Invalid Number!");
		return false;
	}
	else if(ipNum < 1)
	{
		alert("Number should be greater than 0!");
		return false;
	}
	else
	{
		return true;
	}
}

// end of dynamic table function 

function resetAll()
{
	document.getElementById('appGetProductionCalendar').value = "Select Production Calendar";
	document.getElementById('time_period_label').style.display = "none";
	document.getElementById('time_period').value="Select Time Period";
	document.getElementById('time_period_desc').value="";
	document.getElementById('no_of_periods').value="";
	resetTimePeriodattributes();
}
function  validtime(x)
{
re = /^(\d{1,2}):(\d{2})([ap]m)?$/;

if(x=='')
{
   alert("Time cant be blank");
   return false;
   }
    if(x != '') {
      if(regs = x.match(re)) {
        if(regs[3]) {
          if(regs[1] < 1 || regs[1] > 12) {
            //alert("Invalid value for hours: " + regs[1]);
            
            return false;
          }
        } else {
          if(regs[1] > 23) {
            //alert("Invalid value for hours: " + regs[1]);
            //form.starttime.focus();
            return false;      
          }
        }
        if(regs[2] > 59) {
          //alert("Invalid value for minutes: " + regs[2]);
          //form.starttime.focus();
          return false;      
        }
      } else {
        //alert("Invalid time format: " + x);
       // form.starttime.focus();
        return false;
      }
    }

    //alert("All input fields have been validated!");
    return true;

   

}
</script>

<!-- To avoid scrollbar at the right side:  style="overflow: hidden" -->
<BODY style="overflow: hidden" onload="init();populateOffSet('selectDays'); ">
<div id="loading" style="position:absolute; width:100%; text-align:center; top:200px;"><img src="/XMII/CM/Testing_AA/Dashboard/Images/loading.gif" border="0" width="150" height="150"></div>
   <script> 
var ld=(document.all);
 
var ns4=document.layers;
var ns6=document.getElementById&&!document.all;
var ie4=document.all;
 
if (ns4)
	ld=document.loading;
else if (ns6)
	ld=document.getElementById("loading").style;
else if (ie4)
	ld=document.all.loading.style;
 
function init()
{
//alert("Hi");

if(ns4){ld.visibility="hidden";}
else if (ns6||ie4) ld.display="none";
}
</script>
<!-- Row Definition -->
<form name="FilterPage">
<TABLE cellpadding="0" cellspacing="0" width="792px" height="100%">
<!-- ========================================================================-->
<!--         Sub-Title                                                                                                                                               -->
<!-- ========================================================================-->

<TR id="Section_2" style="display: inline">
  <TD class="ContentHeaderSection" valign="top" align="left">
	<TABLE cellspacing="0" cellpadding="0">
	<tr>
		<td>
		<TABLE  class="Content" WIDTH="780px" cellspacing="0" cellpadding="5" bordercolor="#FFFFFF" border="1">
			<TR>
				<TD WIDTH="170px"><label>Production Calendar</label></TD>
				<TD WIDTH="220px">
<!--					<APPLET NAME="appGetProductionCalendar" CODEBASE="/XMII/Classes" CODE="iBrowser" ARCHIVE="illum8.zip" WIDTH="220" HEIGHT="20" TABINDEX=1 MAYSCRIPT>
						<PARAM NAME="QueryTemplate" VALUE="Testing_AA/ConfigurationScreens/ProductionCalendar/qryProductionCalendarList">
						<PARAM NAME="DisplayTemplate" VALUE="Testing_AA/ConfigurationScreens/ProductionCalendar/browserProductionCalendarList">
						<PARAM NAME="JSESSIONID" VALUE="VPXJcb5niwqudYuyaB0AfP-7bXZsAFVgLQH28TUA_SAP">
						<PARAM NAME="Content-Type" VALUE="image/png">
				        <Param Name="DefaultItem" Value="Select Production Calendar">
						<Param Name="SelectionEvent" Value="viewTimePeriod">
			        </APPLET>-->
					<select  id="appGetProductionCalendar" style="width:136px" onchange="viewTimePeriod();">
						<option value="Select Production Calendar"> Select Production Calendar </option>
						<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>
				    </select>
			<TD colspan="2">&nbsp;</TD>
			
			</TR>
			<TR id="time_period_label" style="display:none">
				<TD WIDTH="170px" ><label>Time Period</label><font color="red">*</font></TD>
				<TD WIDTH="170px">
					<select  id="time_period" style="width:136px" onchange="NoOfPeriods();">
				      	    <option value="Select Time Period"> Select Time Period </option>
				       	    <option value="Shift"> Shift </option>
					    <option value="Day"> Day </option>
					    <option value="Week"> Week </option>
					    <option value="Month"> Month </option>
					    <option value="Year"> Year </option>
				        	</select>
				</TD>
				<TD colspan="2">
					<TABLE border="0">
						<TR>
							<TD >
								<a class="boldbuttons" id="btn_tp_Add" onclick="javascript:addTP();"><span>   Add   </span></a>
							      </TD>
							<TD >
								<a class="boldbuttons" id="btn_tp_Edit" onclick="javascript:editTP();"><span>   Edit   </span></a>
							      </TD>
						     	<TD>
								<a class="boldbuttons" id="btn_tp_Delete"  onclick="javascript:deleteTP();" ><span>   Delete   </span></a>
						                 </TD>
						</TR>
					</TABLE>
				</TD>
			</TR>
			<TR  id="no_time_period_label" style="display:none">
				<TD WIDTH="170px"><label>No Of Periods</label><font color="red">*</font></TD>
				<TD WIDTH="170px"> 
				<TABLE border="0">
					<TR>
						<TD>
							<input type="text" id="no_of_periods" value=""  maxlength="1" onkeypress="return onlyNumbers();"> </TD>
						<TD></TD>
						<TD></TD>
					</TR>
				</TABLE>
				</TD>

				<TD WIDTH="170px"><label>Time Period Desc</label></TD>
				<TD WIDTH="170px"> <input type="text" name="time_period_desc" value="" maxlength="255"></TD>
			</TR>
			<TR  id="start_first_shift_label" style="display:none">
				<TD WIDTH="170px"><label>Start of First Shift</label><font color="red">*</font></TD>
				<TD WIDTH="320px" colspan="3"> 
				<TABLE border="0">
					<TR>
						<TD  width="90" align="center" bgcolor="#BAD2E8" ><label>SelectDay</label><font color="red">*</font></TD>
						<TD  width="40" align="center" bgcolor="#BAD2E8" ><label>HH:MM</label><font color="red">*</font></TD>
						<TD  rowspan="2"><a class="boldbuttons" id="btn_tp_Edit" onclick="createTable();"><span> Create  Shifts </span></a></TD>
					</TR>
					<TR>
						<TD>
						<select id ="selectDays" style="width:90px"></select>
						</TD>
						<TD>
						<input type="text" name="shiftSH" id ="shiftSH" value =""  size="5" maxlength="5">
						</TD>
					</TR>
				
				</TABLE>
				</TD>

			</TR>
		
<!--			<TR  id="day_timeperiod" style="display:none">
				<TD WIDTH="400px" colspan="4"  >
					<TABLE border="1">
					<TR>
						<TD  width="120" align="center" bgcolor="#BAD2E8" ><label>StartTime</label><font color="red">*</font></TD>
						<TD  width="120" align="center" bgcolor="#BAD2E8" ><label>EndTime</label><font color="red">*</font></TD>
					    <TD  width="70" align="center" bgcolor="#BAD2E8" ><label>Label</label><font color="red">*</font></TD>
					
					</TR>
					<TR>
						<TD  align="center"  ><select id ="offSetStartTime" style="width:75px"> </select><input type="text" name="dayST" id ="dayST" value =""  size="5" maxlength="5"></TD>
						<TD  align="center"  ><select id ="offSetEndTime" style="width:75px"></select><input type="text" name="dayET" id ="dayET" value =""  size="5" maxlength="5"></TD>
						<TD  align="center" ><input type="text" name="daylabel" id ="daylabel" value =""  size="12" maxlength="12"></TD>
					
					</TR>
				
					</TABLE>
				</TD>
			</TR>-->
			<TR  id="week_timeperiod" style="display:none"> 
			
				<TD WIDTH="390px" colspan="4" >
					<TABLE border="1">
					<TR>
						<TD  width="100" align="center" bgcolor="#BAD2E8" ><label>DayOfTheWeek</label><font color="red">*</font></TD>
						<TD  width="100" align="center" bgcolor="#BAD2E8" ><label>Day</label><font color="red">*</font></TD>
						<TD  width="100" align="center" bgcolor="#BAD2E8" ><label>StartTime</label><font color="red">*</font></TD>
						<TD  width="100" align="center" bgcolor="#BAD2E8" ><label>Label</label><font color="red">*</font></TD>
					
					</TR>
					<TR>
						<TD  align="center"  ><select id ="Week" style="width:100px"> </select></TD>
						<TD  align="center"  ><select id ="offSetWeek" style="width:90px"></select></TD>
						<TD  align="center"  ><input type="text" name="weekST" id ="weekST" value =""  size="12" maxlength="5"></TD>
						<TD  align="center" ><input type="text" name="weeklabel" id ="weeklabel" value =""  size="12" maxlength="12"></TD>
					
					</TR>				
					</TABLE>
				</TD>

			</TR>
			<TR  id="month_timeperiod" style="display:none"> 
			
				<TD WIDTH="390px" colspan="4" >
					<TABLE border="1">
					<TR>
						<TD  width="100" align="center" bgcolor="#BAD2E8" ><label>DayOfTheMonth</label><font color="red">*</font></TD>
						<TD  width="100" align="center" bgcolor="#BAD2E8" ><label>Day</label><font color="red">*</font></TD>
						<TD  width="100" align="center" bgcolor="#BAD2E8" ><label>StartTime</label><font color="red">*</font></TD>
						<TD  width="100" align="center" bgcolor="#BAD2E8" ><label>Label</label><font color="red">*</font></TD>
					
					</TR>
					<TR>
						<TD  align="center"  ><select id ="Day" style="width:100px"> </select></TD>
						<TD  align="center"  ><select id ="offSetMonth" style="width:90px"></select></TD>
						<TD  align="center"  ><input type="text" name="monthST" id= "monthST" value =""  size="12" maxlength="5"></TD>
						<TD  align="center" ><input type="text" name="monthlabel" id ="monthlabel" value =""  size="12" maxlength="12"></TD>
					
					</TR>
				
					</TABLE>
				</TD>

			</TR>
			<TR  id="year_timeperiod" style="display:none"> 
			
				<TD WIDTH="490px" colspan="4" >
					<TABLE border="1">
					<TR>
						<TD  width="100" align="center" bgcolor="#BAD2E8" ><label>Month</label><font color="red">*</font></TD>
						<TD  width="150" align="center" bgcolor="#BAD2E8" ><label>Dayof theMonth</label><font color="red">*</font></TD>
						<TD  width="100" align="center" bgcolor="#BAD2E8" ><label>Year</label><font color="red">*</font></TD>
						<TD  width="100" align="center" bgcolor="#BAD2E8" ><label>StartTime</label><font color="red">*</font></TD>
					        <TD  width="100" align="center" bgcolor="#BAD2E8" ><label>Label</label><font color="red">*</font></TD>
					
					</TR>
					<TR>
						<TD  align="center"  ><select id ="Month" style="width:100px" onchange="populateDays();"> </select></TD>
						<TD  align="center"  ><select id ="Days" style="width:100px" disabled></select></TD>
						<TD  align="center"  ><select id ="offSetYear" style="width:100px"></select></TD>
						<TD  align="center"  ><input type="text" name="yearST" id ="yearST" value =""  size="12" maxlength="5"></TD>
						<TD  align="center" ><input type="text" name="yearlabel" id ="yearlabel" value =""  size="12" maxlength="12"></TD>
					
					</TR>
				
					</TABLE>
				</TD>

			</TR>
			 <TR id="shift_timeperiod" style="display:none">
			<TD  colspan="4" >
				<table id="shiftTable">
				</table>
			</TD>
			</TR>
			<TR id="day_timeperiod" style="display:none">
			<TD  colspan="4" >
				<table id="dayTable">
				</table>
			</TD>
			</TR>
			<TR id="add_submit_reset_btns_label" style="display:none">
				<TD  ><a class="boldbuttons" id="btn_add_Submit"  onclick="Timeperiod_onsubmit();"> <span>Submit</span></a>
				<a class="boldbuttons" id="btn_Reset" onclick="javascript:resetAll();"><span>Reset</span></a></TD> 
				<TD colspan="3"><font color="red">*</font> Mandatory Fields. </TD> 
			</TR>
			<TR id="edit_submit_reset_btns_label" style="display:none">
				<TD ><a class="boldbuttons" id="btn_edit_Submit" onclick="javascript:editSubmit(no_of_periods.value);"><span>Submit</span></a>
				<a class="boldbuttons" id="btn_Reset" onclick="javascript:resetAll();"><span>Reset</span></a></TD> 	
				<TD colspan="3"><font color="red">*</font> Mandatory Fields. </TD>
			</TR>
		</TABLE>
		</td>
	</tr>
	</TABLE>
  </TD>
</TR>
<!-- === Content (Flexible Height) =================================================-->
<TR height="100%"><TD valign="top" align="left">
<!-- Content (Flexible Height) -->
<!--iframe src="TimePeriod.irpt" width="100%" height="100%" name="ifr_Content" scrolling="auto"  frameborder="0" >
  <p>Your browser cann't dislay iframes</p>
</iframe-->
</TD></TR>
</TABLE>
 </form>
</BODY>
</HTML>
[\code]

Thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top