if a user selects image can user preview the image before inserting

Last Reply 14 days ago By dharmendr

Posted 14 days ago

This question was addressed on this link, but i was asked to ask it as a new question, i asked if a user selects image, can user preview the image before inserting?

https://www.aspforums.net/Threads/105204/How-do-i-select-image-sticker-in-datalist-and-insert-into-table-with-textbox-comment/?p=1#Replies

example of image preview

 

 <script type="text/javascript">
        $(function () {
            $('#FileUploadpost').change(function () {
                $('#Image1crop').hide();
                var reader = new FileReader();
                reader.onload = function (e) {
                    $('#Image1crop').show();
                    $('#Image1crop').attr("src", e.target.result);
                    $('#Image1crop').Jcrop({
                        onChange: SetCoordinates,
                        onSelect: SetCoordinates
                    });
                }
                reader.readAsDataURL($(this)[0].files[0]);
            });

        });

    </script>

 

 <img id="Image1crop" src="" alt="" style="display: none; width: 30%; height: 30%" class=" img-rounded" />

 

You are viewing reply posted by: dharmendr 14 days ago.