AnantLabs / ocupload

Automatically exported from code.google.com/p/ocupload
0 stars 0 forks source link

Works fine in Firefox, Chrome, IE #31

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I try to use this code in:
-Firefox 23.0.1
-Google Chrome  29.0.1547.76 m
-Internet Explore 8

it work's well.

don't need double clicking.
i use an image where u click and open dir browser. it works fine!

here my portion of code:

[....]
<img class="addAttachments" src="./images/add.png" style="width: 18px; height: 
18px;"></img>
[....]
// upload allegato
jQuery('.addAttachments').each(function(){
    url = './serverSide.php';
    url+= '?id_attachment='+jQuery(this).parent().parent().data('id');

    jQuery(this).upload({
        action: url,
        onComplete: function(response_data){
            // when don't answer 'Id_task' ---> alert errors!
            if(!(/Id_Task/.test(response_data))) { alert(response_data); }
            // if answer 'Id_Task' from serverSide.php, it's all ok!
            if(/Id_Task/.test(response_data)){
                LoadLeftForm({data: response_data});
            }
        }
    });
});

Original issue reported on code.google.com by mammarel...@gmail.com on 29 Sep 2013 at 2:29

GoogleCodeExporter commented 9 years ago
Only one thinks..
The 'img' have to css like this:
.addAttachments{
    padding-top: 3px;
}
and it works fine!

Original comment by mammarel...@gmail.com on 29 Sep 2013 at 2:30