XMLHttpRequest, template in a separate file