<HTML>
<SCRIPT LANGUAGE="JScript">
var str="";
var str1="";
var str2="";
var str3="";
var stock = new Array;
var oRow;
var box;
function addvalue(f)
{
var oCell;
var i, j;
var check="";
stock["0,0"] = f.Employees.options[f.Employees.options.selectedIndex].text;
alert(f.Employees.options.selectedIndex)
stock["0,1"] = f.Tests.options[f.Tests.options.selectedIndex].text;
stock["0,2"] = f.Time.value;
stock["0,3"] = f.Date.value;
// Insert rows and cells into the first body.
for(i=0; i<1;i++)
{
oTBody0.scrollTop=true;
alert("ALERTING CHECK ")
oRow = oTBody0.insertRow();
alert("oRow.sectionRowIndex"+oRow.rowIndex)
oCell = oRow.insertCell();
box = "<INPUT type=checkbox name=checkbox id=chkBX value=check >";
oCell.innerHTML = box
alert("oCell.chekboxvalue"+oCell.innerHTML.value)
for (j=0; j<4; j++)
{
oCell = oRow.insertCell();
oCell.innerHTML = stock[i + "," + j];
alert(stock[i + "," + j])
}
alert(eval("document.Form1.checkbox.checked"));
str+=stock["0,0"]+","
alert("displayng str "+str)
document.forms[0].ResultEmpNames.value = str;
alert("prntng the result value "+document.forms[0].ResultEmpNames.value)
str1+=stock["0,1"]+","
alert("displayng str1 of tests "+str1)
document.forms[0].ResultAssTests.value = str1;
alert("prntng the result value "+document.forms[0].ResultAssTests.value)
str2+=stock["0,2"]+","
alert("dsplayng dates "+str2)
document.forms[0].ResultDates.value = str2;
alert("prntng the result value "+document.forms[0].ResultDates.value)
str3+=stock["0,3"]+","
alert("dsplayng dates "+str3)
document.forms[0].ResultTime.value = str3;
alert("prntng the result value "+document.forms[0].ResultTime.value)
alert(oRow.innerText+"oRow.innerText")
}
}
function removevalue()
{
if(oTable.rows.length>0)
{
for(var i=7; i<(oTable.rows.length+7); i++)
{
alert(document.forms[0].elements[i].value+" ALERTING")
if(document.forms[0].elements[i].checked==true)
{
alert(oTable.rows.length)
//oRow.sectionRowIndex=i;
alert(box.value+"oooooooooooooooooo")
oTable.deleteRow(oTable.rows[i])
}
}
}
}
/*alert(eval("document.Form1.checkbox.checked"));
alert(box.value)
alert(document.forms[0].ResultEmpNames.value)
//oTBody0.deleteRow(oRow.rowIndex);
oTBody0.deleteRow();*/
function getListItems(theform)
{
alert(oRow.length)
alert(oRow.innerText+"--------------oRow.innerText")
//document.forms[0].ResultEmpNames.value = oRow.innerText;
//alert(document.forms[0].ResultEmpNames.value)
/*str+=stock["0,0"]+","
alert("displayng str "+str)
document.forms[0].ResultEmpNames.value = str;
alert("prntng the result value "+document.forms[0].ResultEmpNames.value)
str1+=stock["0,1"]+","
alert("displayng str1 of tests "+str1)
document.forms[0].ResultAssTests.value = str1;
alert("prntng the result value "+document.forms[0].ResultAssTests.value)
str2+=stock["0,2"]+","
alert("dsplayng dates "+str2)
document.forms[0].ResultDates.value = str2;
alert("prntng the result value "+document.forms[0].ResultDates.value)
str3+=stock["0,3"]+","
alert("dsplayng dates "+str3)
document.forms[0].ResultTime.value = str3;
alert("prntng the result value "+document.forms[0].ResultTime.value)
alert("prntng the result value "+document.forms[0].ResultEmpNames.value)*/
}
function selectAll(chk)
{
for (var i=0;i < document.forms[0].elements.length;i++)
{
var e = document.forms[0].elements[i];
if (e.type == "checkbox")
{
e.checked = chk.checked
}
}
}
function createRadioButton(){
// Create radio button object with value="First Choice" and then insert
// this element into the document hierarchy.
var newRadioButton = document.createElement("<INPUT TYPE='RADIO' NAME='RADIOTEST' VALUE='First Choice'>")
document.body.insertBefore(newRadioButton);
// Create radio button object with value="Second Choice" and then insert
// this element into the document hierarchy.
newRadioButton = document.createElement("<INPUT TYPE='RADIO' NAME='RADIOTEST' VALUE='Second Choice'>")
document.body.insertBefore(newRadioButton);
}
</SCRIPT>
<body bgcolor="#FFFFFF" text="#000000">
<form name=Form1 id=Form1 action="/nextcard/TMSConfirmTest" method=POST>
<table width="89%" border="1" height="100">
<tr align="left" valign="top">
<td colspan="2" height="62" bgcolor="#EFDFCE" valign="baseline">
<img src="/nextcard/Images/Testlogo.gif" width="152" height="80">
<img src="/nextcard/Images/index_r03_c04slk.gif" width="104" height="17">
<font face="Arial, Helvetica, sans-serif" color="#660099" size="+2">
Assign Online
Test</font>
<img src="/nextcard/Images/index_r03_c04slk.gif" width="216" height="19">
<img src="/nextcard/Images/index_r01_c01slk.gif" width="102" height="73">
</td>
</tr>
</table>
<table width="89%" border="1" height="192">
<tr bgcolor="#DDE0E6">
<td width="48%" height="63" align="left" valign="top" bgcolor="#999999"> <p>
<b>Employees:</b>
<select name="Employees" style="width:136;">
<OPTION >som</OPTION>
<option >yat</option>
<option >ram</option>
</P>
</select>
<b>Tests Available:</b>
<select name="Tests" style="width:136;">
<option >
java</option>
<option >oops</option>
<option >c++</option>
</select>
<STRONG>
Time:
<input name="Time" size="10" >
Date:</STRONG>
<input name="Date" size="15" >
</P>
<INPUT name=add onclick=addvalue(this.form) type=button value=add>
<INPUT name=remove onclick=removevalue(this) type=button value=remove>
<table width="70%" border="0" cellspacing="1" cellpadding="1" height="28" bordercolor="#9999ff">
<tr bgcolor="#ccccff" align="middle" valign="center">
<td width="25%" height="2"><b> Check All</b>
<input type="checkbox" name="checkbox" value="checkbox" onclick=selectAll(this)>
</td>
<td width="25%" height="2"><b> Employee Names</b></td>
<td width="20%" height="2"><b>Online Tests</b></td>
<td width="25%" height="2"><b> Date</b></td>
<td width="20%" height="2"><b>Time</b></td>
</tr>
<TABLE ID="oTable" BORDER =1 BGCOLOR="c6a893">
<TBODY ID="oTBody0"></TBODY></TR></TABLE>
<input type=IMAGE src="/nextcard/images/Notify.gif" width="150" height="20" name="OK" onClick=getListItems(this.form) action="/nextcard/TMSConfirmTest" method=post>
<INPUT name=ResultEmpNames type=hidden >
<INPUT name=ResultAssTests type=hidden>
<INPUT name=ResultDates type=hidden>
<INPUT name=ResultTime type=hidden>
</table>
</form>
</BODY>
</HTML>