still unable to work.............
i have made this changes.....
<select name = "Selsite"
onChange="window.location=document.url='Displayresults?Site='+this.options[this.selectedIndex].value">
<%
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>
</script>
"Shawn K. Hall" <[EMAIL PROTECTED]> wrote:
Hi Nice Guy,
> 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.
ASP is a *server-side* language. You may not call server-side
procedures on client-side events. You can, however, push all the data
(if there's not too much) to the client in an array and use javascript
or vbscript on the client to fill out the fields for you. I use
similar things on a number of sites.
> 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.
Your second-best alternative would be to have the onchange event of
the select hit the server with something like this (wanring:
pseudocode):
onchange="window.location=document.url='?id='+this.options[this.select
edIndex].value"
Then in the page you'd just check request.querystring("id")<>"" to get
the ID of the requested record.
This WILL force another request to the server, but it would go to the
same "page," assuming that's your actual need.
Regards,
Shawn K. Hall
http://ReliableAnswers.com/
'// ========================================================
Crime wouldn't pay if the government ran it.
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [EMAIL PROTECTED]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups SponsorADVERTISEMENT
---------------------------------
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 the Yahoo! Terms of Service.
---------------------------------
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/