oTree Forum >

link other html that opens in new window in html page

#1 by nathalieroemer

Hi everyone,

I want to link another html page (Report.html) within my html, that opens in a new browser window. It contains player variables, why I cannot use a static file (for which I know this works). 

When I click the button, it just opens the same page again in a new browser tab.

I have the following code in the html:
<p>
    <button type="button" onclick="NewTab()", onclick="buttonClicked()">Show Report</button>
</p>
<script>
    function NewTab() {
         window.open('Report.html', "_blank");
     }
</script>

- If I use folder/Report.html it opens a new window with the next 'Not found'.

Any help is really appreciated!

Thank you!
Nathalie

Write a reply

Set forum username