is it possible to preview the image in popup window. below is my basic code but i really dont know how to call the selected picture to view in the popup window.



function newPopup(url) {
var img = document.getElementById('photoimg').value;
urla = url+'?img='+img;
popupWindow = window.open(
 urla,'popUpWindow','height=700,width=680, left=300,top=10,resizable=yes,scrollbars=yes,toolbar= ,menubar=no,location=no,directories=no,status=yes');
}

<form id="imageform" method="post" enctype="multipart/form-data">
<input type="file" name="photoimg" id="photoimg" />
<a href="JavaScript:newPopup('popup_view.php');"><img src="button.png"></a>
</form>

what i mean is when i click the preview button, the picture should be display in popup window  which is the popup_view.php. 
thnx in advance your help would be appreciated.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.