[eluser]munnu[/eluser]
i have also try to upload file but it gives me an error "You did not select a file to upload"
what is the problem it could be
[removed]
jQuery(document).ready(function(){
//alert('load');
jQuery('.upload').change(function(){
//jQuery('#graduate').removeAttr('action');
alert(this.name);
ajaxFileUpload(this.name);
});
});
function ajaxFileUpload(file_obj){
alert("<?php print site_url('upload/do_upload')?>");
alert(file_obj);
jQuery("#loading")
.ajaxStart(function(){
jQuery(this).show();
})
.ajaxComplete(function(){
$(this).hide();
});
jQuery.ajaxFileUpload
(
{
url:'<?php print site_url('upload/do_upload')?>',
secureuri:false,
fileElementId:file_obj,
dataType: 'json',
success: function (data, status)
{
if(typeof(data.error) != 'undefined')
{
if(data.error != '')
{
alert(data.error);
}else
{
alert(data.msg);
}
}
},
error: function (data, status, e)
{
alert(e);
}
}
)
return false;
}
[removed]
//upload file
<?php
$application_essay=array(
'id'=>'application_essay',
'name'=>'application_essay',
'class'=>'upload'
);
print form_upload($application_essay);
?>