Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Autocomplete documentation error?

$
0
0
Re: Autocomplete documentation error?
Web Connection 5.0
Re: Autocomplete documentation error?
04/27/2012
07:27:43 AM
3HM0FZT2M Show this entire thread in new window
Gratar Image based on email address
From:
Geoff Bannoff
To:
Attachments:
None
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() *** 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


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:

*** 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





Viewing all articles
Browse latest Browse all 10393

Trending Articles