Kevin Dangoor wrote:

On 12/27/05, Kevin Dangoor <[EMAIL PROTECTED]> wrote:
Hmm... I just tried out the change in the test app that I had and the
autocomplete field no longer seems to do anything (I don't see it
making requests to the server... I *did* see the spinner png (not the
animated one))

I should note that I'm running Firefox 1.5.

Note that I *didn't* change anything in my test app from the previous
version of the autocomplete field, because I didn't think I had to,
since the widget code didn't change.

Kevin

Since you are not seeing the animated spinner I think it's a javascript problem, try enabling the javascript console from the tools menu in Firefox and see if something is showing up Check this site[1] to see if the autocompleting is working, it's a very simple app that I used to test Opera, FireFox and IE. It's running with the TG trunk, with the autocompletefield changes already commited to the repository. If this one works try clearing you Firefox cache (it has given me problems in the past caching some stuff that it shouldn't have), just in case....

[1] http://201.252.204.35:8888/autocomplete/

Snippets from the code of [1]:

controllers.py
   [...]
   @turbogears.expose(template="pruebatg.templates.autocomplete")
   def autocomplete(self):
       campoArticulo = widgets.AutoCompleteField(
           name='buscarArticulo',
           searchController=turbogears.url('/buscarArticulo'),
           attrs=dict(size=50,maxlength=50)
       )
       return dict(campoArticulo=campoArticulo)
@turbogears.expose(allow_json=True)
   def buscarArticulo(self, searchString):
articulos = Articulo.select(Articulo.q.Descripcion.startswith(searchString), orderBy=Articulo.q.Descripcion).limit(10)
       return dict(textItems=[p.Descripcion for p in articulos])

autocomplete.kid
   [...]
   <body>
       <h2>Test de AutoComplete</h2>
           <p>Buscar Artículo<br/>
               <span py:replace="campoArticulo.insert()"></span>
</p> </body>
   </html>

--
Claudio



Reply via email to