def ajax_lookup(request,channel):
This is one of my views.I am using this to do autocomplete
This is the js for it . And I am getting an obvious error of lesser no. of attributes being s开发者_开发知识库ent as I am sending 1 in place of 2. How do I send the second argument ?
<script type="text/javascript">
Ext.onReady(function(){
{% autoescape off %}
var searchTable = new GeoNode.MapSearchTable({
renderTo: 'search_results',
trackSelection: true,
permalinkURL: '{% url ajax_lookup %}',
searchURL: '{% url ajax_lookup %}',
searchParams: {{init_search}}
});
{% endautoescape %}
});
</script>
Might this fix it?
<script type="text/javascript">
Ext.onReady(function(){
{% autoescape off %}
var searchTable = new GeoNode.MapSearchTable({
renderTo: 'search_results',
trackSelection: true,
permalinkURL: '{% url views.ajax_lookup channel.id %}',
searchURL: '{% url views.ajax_lookup channel.id %}',
searchParams: {{init_search}}
});
{% endautoescape %}
});
</script>
精彩评论