Pari13 -1 Junior Poster in Training

Hello Developers,
I am not able to get client path on file(image) upload .so i can disply that file(image) in image control on upload file.

On my local machine below code worked nicely.

<img id="imgProductHallmark" name="imgProductHallmark" src="" alt="Image" width="95" height="113" runat="server"/><br />
<input name="ProductHallmarkUploadID" id="ProductHallmarkUploadID" type="file" onchange="LoadImage1()" runat="server" />

In Javascript

<script language="javascript" type="text/javascript">   
function LoadImage1()
{  
 alert(document.getElementById('<%=ProductHallmarkUploadID%>').value);
 document.getElementById('imgProductHallmark').src=document.getElementById('ProductHallmarkUploadID').value;      
}
</script>


Above code is worked correctly on my local machine.
but  it's not worked on server and get not correct path of file on server. so i can't able disply image on user upload image.

please help me...

Thanks
Dhimmar.
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.