flask redirect to a new page when click on button code example
Example: Howt o get redirected to another page using a button in HTML using Python using Flask
<button type="button" onclick="window.location.href='{{ url_for( 'dataTablePage' , table='Y' ) }}';">Display Table Y</button>