This is in "Implementing Server Side AutoComplete Functionality" under the subtopic "Using a Process Class Method". This is the code sample in that section:
FUNCTION SymbolAutoComplete()
lcFilter = Request.Params("term")
loServer = CREATEOBJECT("YahooStockServer")
lnCount = loServer.GetStockSymbols(lcFilter)
SELECT symbol as value, PADR(Symbol + " - " + company,150) as label, exchange ;
FROM TStockSymbols ;
INTO CURSOR TStockSymbols2
IF lnCount = 0
RETURN null
ENDIF
loSer = CREATEOBJECT("wwJsonSerializer")
Response.ContentType = "application/json"
Response.Write("cursor_rawarray:TStockSymbols2")
Response.End()
ENDFUNC
I downloaded Westwind version 5.62 on April 24 at 11 am Pacific time.
.. Geoff
Geoff,
Thanks for the feedback. What topic is this? I see it in Implementing Server Side AutoComplete functionality, but the code is correct and has loSer in there...
+++ Rick ---
I tried following the documentation for the new Autocomplete control, and got stuck. Trying to run this as a Process Class method, as it's just a simple lookup from a vendor table.
The help file says:
loSer = CREATEOBJECT("wwJsonSerializer")
Response.ContentType = "application/json"
Response.Write("cursor_rawarray:TStockSymbols2")
Response.End()
Didn't work. But this did:
loSer = CREATEOBJECT("wwJsonSerializer")
Response.ContentType = "application/json"
Response.Write(loSer.writevalue("cursor_rawarray:TStockSymbols2"))
Response.End()
It's a pretty cool feature. Thanks for creating this, Rick!
.. Geoff