In your controller:
@service.json
def get_days():
return ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
And in your view:
jQuery.getJSON("{{=URL(r=request,f='call',args=['json','get_days'])}}",
function(msg){
jQuery.each(msg, function(){ jQuery("#target").append(this + "<br />"); } )
}
);
That's it!
Comments (1)
0
ariel 13 years ago