In my JavaScript
:
Code:
function setVal(counter,type,cell)
{
alert("counter = " + counter);
alert("type = " + type);
alert("cell = " + cell);
the_value=<%=iCounter%>
the_counter=counter;
con_agt_pub=type;
if (type=="all")
{
checkAll = true;
}
if (type!="all")
{
checkAll = false;
}
if(cell=="td")
{
alert("CELL == td");
if(checkAll!=true)
{
alert("checkAll!=true");
for (x=0;x<counter;x++)
{
eval("document.form."+type+""+x+".checked = true")
checked=true;
}
}
if(checkAll==true)
{
alert("checkAll==true");
for (w=0;w<counter;x++)
{
alert("inside loop");
alert("w CONTROL = " + w);
eval("document.form.con"+w+".checked = true")
eval("document.form.agt"+w+".checked = true")
eval("document.form.pub"+w+".checked = true")
}
}
}
}
In my ASP
Code:
<td height="20" bordercolor="#000000" align="center" bgcolor="#006699" colspan="3"
onClick="javascript: document.form.all.value='all'; var all; all=true; setVal(<%=iCounter%>,'all','td');"
onMouseOver="this.bgColor = '#C0C0C0'; this.style.color='#000000'; style.cursor='hand'; window.status='';"
onMouseOut="this.bgColor = '#006699'; this.style.color='#FFFFFF';window.status='';">
Check All
</td>
I have form fields called 'con0' to 'con15' for example.
The check all <td> is not working??
TIA.
Picco
www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
www.piccosmini.co.uk.tt
www.morton.uk.tt