<%
'we expect a parameter named "term" from the ajax call. make sure to protect against SQLinjection

dim output

set rs=db.rs
rs.open("select sText from country where sText like '" & aspl.sqli(aspl.getRequest("term")) & "%'")

output = "["

while not rs.eof

	output = output & """" & aspl.json.escape(rs(0)) & ""","
	rs.movenext
	
wend 

output = left(output,len(output)-1) & "]"

aspl.dumpJson(output)
%>