I currently have the code (this is a cut down version!):
---------------------------------------------------------
<html>
<head>
<%
public sub getManagers()
strSQL = "SELECT PayNo, ManagerName FROM tblManager"
Set rs = Conn.Execute(strSQL)
Do while not rs.eof
Response.write "<option value='" & rs("PayNo" & "'>"
Response.write rs("ManagerName"
Response.write "</option>"
rs.MoveNext
Loop
rs.close
set rs=nothing
end sub
%>
</head>
<body>
<!-- Missing Stuff Here-->
<%
Set Conn = Server.CreateObject("ADODB.Connection"
MdbFilePath = Server.MapPath("RECON2000.mdb"
strSQL2 = ""
strSource="Provider=Microsoft.Jet.OLEDB.4.0;Password=;User ID=Admin;Data Source=" & _
mdbFilePath & ";Persist Security Info=True"
Conn.open strSource
%>
<form action="dropdown5.asp" method="post">
<table border="1" width="100%">
<tr>
<td width="25%">Agent Name</td>
<td width="25%"><input type="text" name="txtAgent" size="20"></td>
<td width="25%">Manager Name</td>
<td width="25%"><select size="1" name="cboManager">
<% getManagers %>
</select>
</td>
</tr>
</table>
</form>
----------------------------------------------------------
I have a subroutine (the same as getManagers in structure) called getCallType() that populates a drop-down called cboCallType.
I would like to have some method of re-populating the cboCalltype whenever cboManager is changed.
I have tried using -- onChange="<%getCallType%>" attached to the cboManager drop-down. However this has the effect of adding what I would like to see in cboCallType into cboManager.
Hopefully I'm not to far off track, but think that perhaps I am unsure where VBScript ends and ASP begins in the above (eg is my subrouting written in VB Script, Written in VBScript but implemented as ASP, written in ASP??!!).
Hope this makes sense
Thanks in advance for any suggestions
Graeme
---------------------------------------------------------
<html>
<head>
<%
public sub getManagers()
strSQL = "SELECT PayNo, ManagerName FROM tblManager"
Set rs = Conn.Execute(strSQL)
Do while not rs.eof
Response.write "<option value='" & rs("PayNo" & "'>"
Response.write rs("ManagerName"
Response.write "</option>"
rs.MoveNext
Loop
rs.close
set rs=nothing
end sub
%>
</head>
<body>
<!-- Missing Stuff Here-->
<%
Set Conn = Server.CreateObject("ADODB.Connection"
MdbFilePath = Server.MapPath("RECON2000.mdb"
strSQL2 = ""
strSource="Provider=Microsoft.Jet.OLEDB.4.0;Password=;User ID=Admin;Data Source=" & _
mdbFilePath & ";Persist Security Info=True"
Conn.open strSource
%>
<form action="dropdown5.asp" method="post">
<table border="1" width="100%">
<tr>
<td width="25%">Agent Name</td>
<td width="25%"><input type="text" name="txtAgent" size="20"></td>
<td width="25%">Manager Name</td>
<td width="25%"><select size="1" name="cboManager">
<% getManagers %>
</select>
</td>
</tr>
</table>
</form>
----------------------------------------------------------
I have a subroutine (the same as getManagers in structure) called getCallType() that populates a drop-down called cboCallType.
I would like to have some method of re-populating the cboCalltype whenever cboManager is changed.
I have tried using -- onChange="<%getCallType%>" attached to the cboManager drop-down. However this has the effect of adding what I would like to see in cboCallType into cboManager.
Hopefully I'm not to far off track, but think that perhaps I am unsure where VBScript ends and ASP begins in the above (eg is my subrouting written in VB Script, Written in VBScript but implemented as ASP, written in ASP??!!).
Hope this makes sense
Thanks in advance for any suggestions
Graeme