If we want to show the popup message by clicking the button, Then Click “ok” redirect to another Page and “Cancel” reloads the same page on Javascript.
if (confirm(‘Are you sure ‘)) {
window.open(‘/apex/Reports’);
}else {
window.location.reload();
}
Result:-
————————————-Hope this will help you!!!!!!———————————–