hi..guys..this is thesecond time i'm submitting this problem. i din get any responce 
on the first. i'm using ASP and SQL Server. i hav already created the dropdown which 
gets its data from database. The problem is tht when i click a data in the dropdown, i 
want it to show the information(from database) regarding the data i click at dropdown. 
the info must be displayed in the same page. Example, u click Site X at the dropdown, 
all the info about it(from database) is displayed........i need this 
urgently....thanks.....below is my code....:
---------------drop down---------------
<select name = "Selsite" OnChange="App()">
<%
set oRS = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT DISTINCT Site FROM APPLICATION "

strSQL = strSQL & "ORDER BY Site"
oRs.Open strSQL, conn

Do while not oRs.EOF
if Request.Form("Sites") = oRs("Site") then
'Response.Write "<OPTION VALUE = '" & oRS ("Site") & "'Value>"
Response.Write "<OPTION VALUE = '" & oRS ("Site") & "'SELECTED>"

Response.Write oRs("Site") & "</Option>"
oRs.MoveNext
else
Response.Write "<OPTION VALUE = '" & oRs ("Site") & "'>"
Response.Write oRs("Site") & "</Option>"
oRs.MoveNext
end if
loop
%>
</select>


-------------Function----------------

<script language="vbscript">
<!--
 Function AppDropdown()
  
  Dim dSQL
  Dim SiteID
  Response.Write("<tr>")

  SiteID = Request.Form("Selsite")
  dSQL = "SELECT * FROM APPLICATION WHERE Site ="& SiteID&""
  conn.Execute(dSQL)
  Response.Write("<tr>")
  Response.Write(" <td><a href=Search_App.asp?App_ID=")
  Response.Write("" & RS.Fields("App_ID") & " ")
  Response.Write(" target='main'>")
  Response.Write("" & Trim(RS.Fields("App_Name")) & " ")
  Response.Write(" ( ")
  Response.Write("" & Trim(RS.Fields("Site")) & " ")
  Response.Write(" ) ")
  Response.Write(" </a></td>")
  Response.Write("</tr>")
   End Function
-->

</script>


                
---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!

[Non-text portions of this message have been removed]




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~-> 

---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [EMAIL PROTECTED]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/active-server-pages/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to