Hi, I am a new in ASP. And this question has been bothered me for a week-I just could not make it run. Please help me! Here is the question.
A dropdown box which includes "Active" and "Inactive". When I click Active, the URL should be page1.asp?intactive=1 (this is my thought which I am not sure if it is correct.), and it will upload all active list in this page.
************************************************** *****
Dim intActive, cnnApp, cmdApp, rstApp
intActive = request.querystring("intActive")
<Script Language=JavaScript>
function Status(intActive)
{
if (intActive == "1")
window.document.frmStatus.action="page1.asp?intact ive=1";
else
window.document.frmStatus.action="page1.asp?intact ive=0";
}
</Script>
<form name="frmStatus" method="post">
Please select: <select name="intActive" onChange="Status(this)">
<option value="1">Active</option>
<option value="0"> Inactive</option>
</select>
<input name="submit" type="submit" value="submit" >
</form>
************************************************** **
Or I tried do If statment with connection but not working:
*************************************************
if (intActive == "1") Then
Set cnnApp = OpenDB()
Set cmdApp = Server.CreateObject("ADODB.Command")
With cmdApp
.ActiveConnection = cnnApp
.CommandType = adCmdStoredProc
.CommandText = "sel_activelist"
Set rstApp = .Execute
End With
Set rstApp.ActiveConnection = Nothing
CloseDB cnnApp
Set cmdApp = Nothing
end if
************************************************** **
if I can use IF with connection DB, how do I do with inactive list?
Please help me! I really have no clue for it. Thanks so much!
