Dmitry, you should return JSONP only for crossdomain requests. if you are on the same domain and port you can send JSON.
2011/4/29 Dmitry L. <[email protected]> > Hi! > > Your controller must return JSONP data (not just JSON) > > jQuery send additional param to you controller ("callback" by default, I > think) > my $cb = $c->req->param("callback"); > > So View::JSON should return something like this: $cb($data); > Where $data is [{"value":"1","label":"betty"},{"value":"2","label":"jane"}, > {"value":"3","label":"marge"}] > > And Content-type header probably should be "application/javascript" > > Or look at jQuery.autocomplete manual to use JSON (instead of JSONP) > > -- > //wbr, Dmitry L. > > _______________________________________________ > List: [email protected] > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: > http://www.mail-archive.com/[email protected]/ > Dev site: http://dev.catalyst.perl.org/ >
_______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
