Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Dropdown List problem


i have 3 dropdown list 1 for College list 2nd for Department list and 3rd for Research or events. First i'm getting college name from database and filling it in 1st drop down list box. when i select the anyone of the college i want to fill that college departments in 2nd dropdown list box in same way when i select department i want to fill research/event for the selected college and department.

i have code but it not working properly

like this...


dim rec
public cg_code
Set rec = Server.CreateObject("ADODB.Recordset") "select * from college",con,2,2

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

Untitled Document

function college_change()
window.location.href="archieve1.asp? fw=ls&cg_code="

function dept_change()

<%if request.QueryString("fw")="ls" then %>

if not (request.QueryString("cg_code"))="" and not (request.QueryString("dp_code"))="" then
if rec.state=1 then rec.close "select ne_code_in,ne_titile_vc from newsevents where cg_code_in="& request.QueryString("cg_code") & " and dp_code_in="& request.QueryString("dp_code")
response.Write("No.of records =>"& rec.recordcount)

      Name of the College

      Name of the Department

      Event / Research



<% end if %>

Set Rec = Nothing

Thanks your help for me guys

Jai Sankar N

Sign In or Register to comment.