I think it's a client side problem, that Autocomplete plugin is not the jQuery UI Autocomplete.<div>You should grab the latest from <a href="http://jqueryui.com">http://jqueryui.com</a> and you can read the documentation here: <meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://jqueryui.com/demos/autocomplete/">http://jqueryui.com/demos/autocomplete/</a><br>
<br></div><div>ps: the JSON data structure is fine.</div><div><br><div class="gmail_quote">2011/4/29 Armin Wenz <span dir="ltr"><<a href="mailto:wenz@ub.uni-frankfurt.de">wenz@ub.uni-frankfurt.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi all,<br>
<br>
I've read the last years the thread about "Using Jquery UI Autocomplete widget with Catalyst::View::JSON". And still got a problem:<br>
<br>
My template is:<br>
<script type="text/javascript" src="/static/js/jquery.validate.min.js"></script><br>
<script type="text/javascript" src="/static/js/jquery.bgiframe.min.js"></script><br>
<script type="text/javascript" src="/static/js/jquery.ajaxQueue.js"></script><br>
<script type="text/javascript" src="/static/js/jquery.autocomplete.min.js"></script><br>
<script type="text/javascript" src="/static/js/thickbox-compressed.js"></script><br>
<link rel="stylesheet" href="[% c.uri_for('/static/css/jquery/jquery.autocomplete.css') %]" ></link><br>
<br>
<script type="text/javascript"><br>
<!--<br>
$(document).ready(function(){<br>
$("#model").autocomplete("[% c.uri_for('/model/modellist') %]", {<br>
selectFirst: false,<br>
width: 260,<br>
});<br>
});<br>
//--><br>
</script><br>
<br>
<form id="commentForm" class="cmxform" method="post" action="[% c.uri_for('save') %]"><br>
<table><br>
<tr><br>
<td class="label">Modell</td><br>
<td class="data"><input id="model" name="model" size="40" /></td><br>
</tr><br>
</table><br>
</form><br>
<br>
<br>
In my Controller<br>
sub modellist :Local {<br>
my ( $self, $c ) = @_;<br>
my @aoh = ( { value => "1", label => "betty", },<br>
{ value => "2", label => "jane", },<br>
{ value => "3", label => "marge", },<br>
);<br>
$c->stash->{json} = \@aoh;<br>
$c->forward('View::JSON');<br>
}<br>
<br>
When I enter a character into the input-field, the above URL is called and the follwing data is returned:<br>
<br>
[{"value":"1","label":"betty"},{"value":"2","label":"jane"},{"value":"3","label":"marge"}]<br>
<br>
But I don't get the expected dropdown, where I can select any of the returned data.<br>
<br>
As far as the returned data seems to be okay, I assume that the mistake lies within the template (maybe I forgot something?)<br>
<br>
Can anybody give me a hint?<br>
<br>
Thanks in advance.<br>
<br>
-- <br>
<br>
Armin Wenz<br>
<br>
Universitätsbibliothek Johann Christian Senkenberg<br>
Telefon: 069-798-39504<br>
<br>
_______________________________________________<br>
List: <a href="mailto:Catalyst@lists.scsys.co.uk" target="_blank">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br>
</blockquote></div><br></div>