What potential issues can arise when using JavaScript to open new windows in PHP applications?

One potential issue when using JavaScript to open new windows in PHP applications is that it may not work properly if the user has disabled JavaScript in their browser. To solve this, you can use PHP to generate the window opening code directly in the HTML output.

<?php
echo '<a href="javascript:void(0);" onclick="window.open(\'http://example.com\', \'_blank\');">Open New Window</a>';
?>