[Catalyst] Do you dojo?

Toby Corkindale toby at ymogen.net
Mon Jun 5 16:18:32 CEST 2006


Carl Franks wrote:
> On 02/06/06, Toby Corkindale <toby at ymogen.net> wrote:
> 
>> But how do I, for example, implement an auto-completing select list?
>> (a-la Prototype)
>>
>> The example in Dojo just loads a URL, but doesn't seem to pass the
>> text-so-far to it. How do you get it to do that?
> 
> When you set the "DataURL", if that string contains "%{searchString}",
> that'll be replaced with what's been typed.
> Example: if the DataURL is set to "/foo.cgi?usertyped=%{searchString}"
> then the "usertyped" parameter in foo.cgi will contain whatever the user typed.

That doesn't seem to work for me - I just get sent the literal 
"%{searchString}"!

I can see "searchString" is mentioned in widgets/ComboBox.js around line 
34 with a call to paramString, and i see in string/extras.js, that that 
function does a regex to replace %{..blah..} with the input..

So i'm confused as to why it doesn't work!


Also, I noticed that the call to the combobox handler is made once on 
pageload, but isn't called any more as I start typing into it.. Is this 
correct behaviour?

Thanks,
TOby



More information about the Catalyst mailing list