I'm trying to add a javascript button dynamically in ASP.NET MVC using JQuery.Uploadifive js library. When I try to run it, the button is not visible.
My code where I'm trying to add the button:
$(document).ready(function () {
$("#imgUploader").fileUpload({
'buttonClass': 'btnClass',
'buttonText': 'Upload Image',
'uploadScript': '@Url.Content("~/Upload/Upload/")',
'multi': false,
'auto': true,
'height': 30,
'width': 100,
'onSelect': function (event, ID, fileObj) {
$.blockUI({ message: '<h2><img src="@Url.Content("~/Content/Images/loader.gif")" /><br/> Uploading Image...</h2>' });
}
, 'onUploadComplete': function (event, ID, fileObj, response) {
// debugger;
console.log(data);
}
});
});
Code where I've to add the button:
<div class="TextPhoto">
<div id="imgUploader">
</div>
</div>