IC SunsetThe developerWorks Connections platform will be sunset on December 31, 2019. On January 1, 2020, this community and its apps will no longer be available. More details available on our FAQ.
Topic
  • 3 replies
  • Latest Post - ‏2014-09-20T11:44:36Z by jitupkp
RaviAhuja
RaviAhuja
1 Post

Pinned topic Ajax uploder not working on Chrome,safari,opera

‏2010-08-20T18:53:23Z |
Hey

i m trying to upload a video file using ajax & jquery in php, its working fine on firefox & IE, but its doesnt work on chrome,safari,& opera ..after selecting file a uploader image is apearing & uable to redirect after success. getting very irritated. here is my script
<script type="text/javascript" >
$(function(){
var a=1;
var btnUpload=$('#upload');
var status=$('#status');
new AjaxUpload(btnUpload, {
action: 'ajax/ajax-upload.php?add_new=true',
name: 'uploadfile',
onSubmit: function(file, ext){
if(a!=1)
{
alert('File uploading is in process');
return false;
}
if (! (ext && /^(avi|wmv|mpeg|mpg|mov|flv)$/.test(ext))){
status.text('Only avi,wmv,mpeg,mpg,mov,flv files are allowed ' );
return false;
}
a=a+1;
status.text('');
$('<img src="images/ajax-loader.gif" />').appendTo('#status');

},
onComplete: function(file, response){

switch(response)
{

case '1' : { //$("#status").html("<strong> Video uploaded successfully</strong>");
document.location.href="<?php echo HOST ?>edit-video.php"; break; }
case '2' : { $("#status").html("<strong> File uploading fail</strong>"); break; }
case '3' : { $("#status").html("<strong> Invalid Format</strong>"); break; }
case '4' : { $("#status").html("<strong> Upload a File please.</strong>"); break; }
case '5' : { $("#status").html("<strong> Ooops! Max file size limit is 10 MB .</strong>"); break; }
}
}
});

});

</script>
plz help me out.
thanks in advance,
Ravi ahuja
  • bhaveshbodar
    bhaveshbodar
    1 Post

    Re: Ajax uploder not working on Chrome,safari,opera

    ‏2014-03-06T11:25:17Z  

    Dear Ravi ahuja,

    visit this link to i think you can resolve your problem. http://easyscript4u.blogspot.in/2014/03/fancy-multiple-file-upload-using-ajax.html

     

    Updated on 2014-03-06T11:25:37Z at 2014-03-06T11:25:37Z by bhaveshbodar
  • jitupkp
    jitupkp
    104 Posts

    Re: Ajax uploder not working on Chrome,safari,opera

    ‏2014-09-20T10:54:23Z  

    Dear Ravi ahuja,

    visit this link to i think you can resolve your problem. http://easyscript4u.blogspot.in/2014/03/fancy-multiple-file-upload-using-ajax.html

     

    see more

    http://techgurulab.com/course/ajax-quiz-online/

  • jitupkp
    jitupkp
    104 Posts

    Re: Ajax uploder not working on Chrome,safari,opera

    ‏2014-09-20T11:44:36Z  

    get more help

    http://techgurulab.com/course/ajax-quiz-online/