Templating Ajax for result table