By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,600 Members | 1,887 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,600 IT Pros & Developers. It's quick & easy.

using passed variable in asp

P: 1
I had the problem of using the variable in asp code that had passed in java script function

Here the code i used

Expand|Select|Wrap|Line Numbers
  1. function fun(form2,cname)
  2. {
  3. alert(cnme.value)
  4. <%
  5.  set sql=server.CreateObject("ADODB.RECORDSET")
  6.     set sql=ADOCONN.EXECUTE("SELECT DISTINCT app_no FROM app_request WHERE((username) LIKE '"&cname&"') ORDER BY app_no")
  7.     %>
  8. }
But the code not working
How do i acess the variable cname
Sep 13 '06 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 16,027
ASP is server-side. Once the page is executed, you can no longer run the ASP code in the normal way, but you can use Ajax. See this example to get you started.
May 13 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.