using passed variable in asp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maheshd
    New Member
    • Sep 2006
    • 1

    using passed variable in asp

    Hai
    I had the problem of using the variable in asp code that had passed in java script function

    Here the code i used

    Code:
    function fun(form2,cname)
    {
    alert(cnme.value)
    <%
     set sql=server.CreateObject("ADODB.RECORDSET")
    	set sql=ADOCONN.EXECUTE("SELECT DISTINCT app_no FROM app_request WHERE((username) LIKE '"&cname&"') ORDER BY app_no")
    	%>
    }
    But the code not working
    How do i acess the variable cname
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    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.

    Comment

    Working...