switch views from js to html