I am facing an issue where I have a webpage with a URL linking to a PHP file that displays an image, and I want to open this picture in a new window without the blank page showing up.
Currently, when I click on the URL using the code below, a new window opens along with a blank page, which is not desired as I have to close it every time. I only want the window to display the picture.
window.open('image.PNG', 'image', 'toolbar,menubar,scrollbars,resizable,height=800,width=400,left=600,top=400');
Any suggestions on how to achieve this?
//edit Using prevent default does not seem to work when I have
<a href="file.php">Link</a> //URL to PHP with script above