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/28/2012
05:03:50 PM
3HN10KO3Z Show this entire thread in new window
Gratar Image based on email address
From:
Rick Strahl
To:
Attachments:
None

Must be old docs:

wcdocs:_3c610ksr2.htm

What version of the docs are your's?

+++ Rick ---


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







Rick Strahl
West Wind Technologies

Making waves on the Web

from Maui, Hawaii

Viewing all articles
Browse latest Browse all 10393

Trending Articles