如何在joomla模块中通过javascript发送输入文件类型

我想用javascript发送一个文件到php文件。
我在我的php文件中有这个表单


upload

和js文件中的白色代码

 jQuery(document).on("click","#poi",function(){ var objfile=new FormData(); var file=jQuery("#file1").get(0).files[0]; objfile.append("iefile078",file); var ajax ; ajax.upload.addEventListener("progress" ,progresshandler ,false); function progresshandler(){ jQuery("#plo").text("uploading ...."); } ajax.open("POST","helper.php"); ajax.send(objfile); }); 

当我点击我页面上的“上传”时,此function正常启动。
我想在上传进行“上传….”节目时向用户显示。
另外我想将此文件发送到helper.php文件。
如何在这种情况下将open()和send()函数的属性设置为传递上传到helper.php的文件?
这是我的文件结构,我的表单位于default.php中

 js jquery.js tmpl default.php helper.php mod_upload.php mod_upload.xml 

试试这个:

 $(document).on("click","#poi", function(e) { e.preventDefault(); var formData = new FormData($(this)[0]); $.ajax({ url: 'helper.php', type: 'POST', data: formData, async: false, beforeSend: function() { $("#message1").show().html("uploading..."); }, success: function(data) { $("#message1").fadeOut(); $("#container").html(data); }, cache: false, contentType: false, processData: false }); });