What alternative solution was suggested to the user to resolve the problem of opening a file in a new window?

The issue is that the user wants to open a file in a new window when clicking on a link, but the target attribute is not working as expected. An alternative solution to this is to use JavaScript to open the file in a new window when the link is clicked.

<a href="file.pdf" onclick="window.open(this.href); return false;">Open File in New Window</a>