mock ajax function, controller to accept json
update template from working code on other project