maybe you can use library Swal (sweet alert) and then when the user click button show an alert with terms and conditions, swal includes a event named then()=>{ // your code for get results here }