hi
I have found a .js for autocomplete. Script works perfectly, but Im just
wondering if it's possible to get records from database ( i use MS
access) and not array.
this is the part of js where options are written:
<script> var customarray=new Array('an apple','alligator','elephant','pear','kingbird','kingbolt', 'kingcraft','kingcup','kingdom','kingfisher','kingpin'); var custom2 = new Array('something','randomly','different'); </script>
|
and this is a rs, but i dont get it to work.
<% Function GetPDFsArray()
Dim objRs
Set objRs = Server.CreateObject("ADODB.Recordset")
mySQL = "SELECT description, sku, price " _ & "FROM Products "
objRs.Open mySQL, connString
If NOT objRs.EOF OR NOT objRs.BOF Then GetPDFsArray = objRs.GetRows() Else GetPDFsArray = "" & objRs("description") & "" End If
End Function
Dim arrPDFs arrPDFs = GetPDFsArray
If isArray(arrPDFs) Then for i=0 to uBound(arrPDFs,2)
Dim javascriptArrayValues javascriptArrayValues=javascriptArrayValues & """" & arrPDFs(0,i) & """" & "," next 'i javascriptArrayValues=Left(javascriptArrayValues,Len(javascriptArrayValues)-1) Else javascriptArrayValues = "Error: No results for array" End If %>
|
Any kind of help would be great.
Thanks