What potential issues can arise from using self.close() to close the original window when opening a new window?
Potential issues that can arise from using self.close() to close the original window when opening a new window include the risk of accidentally closing the new window as well, disrupting the user experience. To solve this issue, it is recommended to use window.open() to open the new window and then call window.close() on the original window.
<script>
var newWindow = window.open('newpage.php', '_blank');
window.close();
</script>