Must be old docs:
What version of the docs are your's?
+++ Rick ---
from Maui, Hawaii
What version of the docs are your's?
+++ Rick ---
FUNCTION SymbolAutoComplete() *** Manually capture the filter expression from the URL lcFilter = Request.Params("term") loServer = CREATEOBJECT("YahooStockServer") lnCount = loServer.GetStockSymbols(lcFilter) *** Transform cursor for AutoComplete - label/value fields are required SELECT symbol as value, PADR(Symbol + " - " + company,150) as label, exchange ; FROM TStockSymbols ; INTO CURSOR TStockSymbols2 IF lnCount = 0 RETURN null ENDIF *** Manually serialize the data loSer = CREATEOBJECT("wwJsonSerializer") Response.ContentType = "application/json" Response.Write("cursor_rawarray:TStockSymbols2") Response.End() ENDFUNC * SymbolAutoCompleteHandler
I downloaded Westwind version 5.62 on April 24 at 11 am Pacific time.
.. 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 ---
The help file says:
*** Manually serialize the data loSer = CREATEOBJECT("wwJsonSerializer") Response.ContentType = "application/json" Response.Write("cursor_rawarray:TStockSymbols2") Response.End()
Didn't work. But this did:
*** Manually serialize the data 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