I am trying to make preview to my uploading Images. I have wrote a function its works fine but it doesnt return the complete url of file which is selected locally.
function imagePreview(pid, input){
$("#"+pid).attr("src", input.value);
$("#"+pid).fadeIn('slow');
}
Html is
<input type="file" class="round sinput" onchange="imagePreview('img1', this);" name="f_pic" id="f_pic" />
this function loads image.jpg not c:\website\image.jpg (complete path which is required to display image)
thank you