HTML and JS to integrate multiple output types