Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
dropdown question in ASP -- please help!
Old 05-26-2005, 12:50 AM dropdown question in ASP -- please help!
Junior Talker

Posts: 3
Trades: 0
Hi, I have a question with dropdown list in ASP. When I click "inactiv" option, the page does not show inactive list. Is there anyone can help me with the code? It has been bothered me for 2 days. Thank you so much. Here is my code:
<%
Dim intActive
intActive = request("ddlactive")

if intActive = "1" then
Set cnnApp = OpenDB()
Set cmdApp = Server.CreateObject("ADODB.Command")
With cmdApp
.ActiveConnection = cnnApp
.CommandType = adCmdStoredProc
.CommandText = "active_list"
Set rstApp = .Execute
End With
else
Set cnnApp = OpenDB()
Set cmdApp = Server.CreateObject("ADODB.Command")
With cmdApp
.ActiveConnection = cnnApp
.CommandType = adCmdStoredProc
.CommandText = "inactive_list"
Set rstApp = .Execute
End With
end if
Set rstApp.ActiveConnection = Nothing
CloseDB cnnApp
Set cmdApp = Nothing
%>
<Script Language=JavaScript>
function validate(thebutton)
{
document.frmapplst.submit();
if (theButton.name=='s1')
document.frmapplst.action='/list.asp?ddlactive='+ document.frmapplst.ddlactive.options[document.frmapplst.ddlactive.selectedIndex].value;
}
</Script>

<FORM NAME="frmapplst" method="post">
Please select: <select name="ddlactive">
<option value="1" >Active</option>
<option value="0" > Inactive</option>
</select>
<input type="button" name="s1" value="Submit" onClick="validate(this)">
</form>
lonestar is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-28-2005, 02:01 PM
Uche's Avatar
Extreme Talker

Posts: 174
Location: Nigeria/Lagos
Trades: 0
Would have love to help but sorry can't help.. but u might find help here http://www.webthang.co.uk thats for ASP/ASP.NET Programmers
__________________
Life is just lyke a school where everybody goes to learn one or two thing. the more u school, the more u learn more about school..The more we live our lifes.. the more we learn more about life.

Please login or register to view this content. Registration is FREE
Uche is offline
Reply With Quote
View Public Profile Visit Uche's homepage!
 
Old 05-28-2005, 02:29 PM
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
does it show the inactive list when the page is first loaded ?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to dropdown question in ASP -- please help!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.16263 seconds with 12 queries