hi friends,
i need some help.
i displayed (in table format) a list of all the departments and under each department is a list of the persons for that department.
what i did is to loop within the recordsets, and i have done that with this code:
<table width="200" border="1" align="center">
<% do while not rsDept.eof%>
<tr>
<td width="20" bgcolor="#006699"><div align="center">
<input type="checkbox" name="<%=rsDept("deptc")%>" value="<%=rsDept("deptc")%>">
</div></td>
<td width="164" bgcolor="#006699"><span class="style8"><%=rsDept("deptc")%></span></td>
</tr>
<%
Dim rsName
Dim rsName_numRows
Set rsName = Server.CreateObject("ADODB.Recordset")
rsName.ActiveConnection = MM_infosys_STRING
rsName.Source = "SELECT * FROM dbo.ACCNT where deptc = '" & rsDept("deptc") & "' ORDER BY lname,fname"
rsName.CursorType = 0
rsName.CursorLocation = 2
rsName.LockType = 1
rsName.Open()
rsName_numRows = 0
do while not rsName.eof
%>
<tr>
<td><input type="checkbox" name="<%=rsDept("deptc")%>" value="<%=rsName("login")%>"></td>
<td><span class="style6"><%=rsName("lname") & ", " & rsName("fname")%></span></td>
</tr>
<%
rsName.movenext
loop
rsName.Close()
Set rsName = Nothing
rsdept.movenext
loop%>
my problem now is to be able to check or uncheck all of the names under a department when i tick the department name. how will i do that? please help!
thanks in advance!
i need some help.
i displayed (in table format) a list of all the departments and under each department is a list of the persons for that department.
what i did is to loop within the recordsets, and i have done that with this code:
<table width="200" border="1" align="center">
<% do while not rsDept.eof%>
<tr>
<td width="20" bgcolor="#006699"><div align="center">
<input type="checkbox" name="<%=rsDept("deptc")%>" value="<%=rsDept("deptc")%>">
</div></td>
<td width="164" bgcolor="#006699"><span class="style8"><%=rsDept("deptc")%></span></td>
</tr>
<%
Dim rsName
Dim rsName_numRows
Set rsName = Server.CreateObject("ADODB.Recordset")
rsName.ActiveConnection = MM_infosys_STRING
rsName.Source = "SELECT * FROM dbo.ACCNT where deptc = '" & rsDept("deptc") & "' ORDER BY lname,fname"
rsName.CursorType = 0
rsName.CursorLocation = 2
rsName.LockType = 1
rsName.Open()
rsName_numRows = 0
do while not rsName.eof
%>
<tr>
<td><input type="checkbox" name="<%=rsDept("deptc")%>" value="<%=rsName("login")%>"></td>
<td><span class="style6"><%=rsName("lname") & ", " & rsName("fname")%></span></td>
</tr>
<%
rsName.movenext
loop
rsName.Close()
Set rsName = Nothing
rsdept.movenext
loop%>
my problem now is to be able to check or uncheck all of the names under a department when i tick the department name. how will i do that? please help!
thanks in advance!