tpl to ajax