2

this is my form it's working.

<form id="form1" runat="server">
    <input type='file' id="inputFile" />
    <img id="image_upload_preview" src="http://placehold.it/100x100" alt="your image" />
</form>

this the jquery and its working:

function readURL(input) {
    if (input.files && input.files[0]) {
        var reader = new FileReader();

        reader.onload = function (e) {
            $('#image_upload_preview').attr('src', e.target.result);
        }

        reader.readAsDataURL(input.files[0]);
    }
}

$("#inputFile").change(function () {
    readURL(this);
});

I want to happen is the URL also shows below and can be edit(so uploaders can just edit the url) like:

check image: http://i.stack.imgur.com/tsObg.jpg

jsfiddle: http://jsfiddle.net/lesson8/9NeXg/light/

kim de castro
  • 289
  • 4
  • 16

0 Answers0