Ajax
am 16.07.2007 16:17:43 von John PeachCan anyone please advise why this wont work ? The fisrt page of code reads
data from a database and populates combobox, depending on the selection made
the second combobox can be poputated, but the second procedure
(select_via_ajax_include.asp ) does not return the variables in the function
call ajaxcombo(sql, selectobjID, loadarea), can anyone advise ?
<%
Dim range
Dim range_numRows
set cn=Server.CreateObject("ADODB.Connection")
cn.Open "Provider=SQLOLEDB.1;Password=glencoe;Persist Security
Info=True;User ID=qadmin;Initial Catalog=UserInfo;Data Source=TLGUKSP17"
Set range=Server.CreateObject("ADODB.Recordset")
range.ActiveConnection=cn
range.Source="SELECT Range FROM [Variance Matrix] GROUP BY Range ORDER BY
Range"
range.CursorType=0
range.CursorLocation=2
range.LockType=1
range.Open()
range_numRows=0
%>
"http://www/w3/org/TR/html4/loose.dtd">
<%range.close
set range=nothing%>
*************** select_via_ajax_include.asp *************
<%
set cn=Server.CreateObject("ADODB.Connection")
cn.Open "Provider=SQLOLEDB.1;Password=glencoe;Persist Security
Info=True;User ID=qadmin;Initial Catalog=UserInfo;Data Source=TLGUKSP17"
Dim Product
dim ProductnumRows
Dim Rnge
Dim newrange
Rnge=request.querystring("range")
newrange=request.querystring("newrange")
set Product=Server.CreateObject("ADODB.Recordset")
Product.Open "exec " & replace(request.querystring("sql"),"%20"," ") , cn
Product_numRows=0
%>
<%
product.close
set product=nothing
%>
Regards
John