0

I am using ajax upload for uploading a image .it is working in all browser but not working in IE.

here is my code what i m using,

  $('#photoimg').live('change', function(){ 
    $(".selectedphoto").html('');
    $(".selectedphoto").html('<img src="loader.gif" alt="Uploading...."/>');
    $("#imageform").ajaxForm({
        target: '.selectedphoto',
                    success:       onsuccess,

    }).submit();

        })';

HTML

<form id="imageform" method="post" enctype="multipart/form-data"  action='ajaximage.php'>
    <input type="file" name="photoimg" id="photoimg" class="required" />
</form>

Thanks in advance.

Rashmi Kumari
  • 520
  • 4
  • 15
  • what's not working? **Does it start to upload the image or it just never starts?** Can you show us how you are loading the javascript files (both jquery and the one you posted here) – Sergi Juanola Nov 25 '12 at 14:01
  • It never start,after selecting the file nothing is happening. – Rashmi Kumari Nov 25 '12 at 14:05
  • what about the ` – Sergi Juanola Nov 25 '12 at 17:21

1 Answers1

0

It is assumed you are using the jQuery Form Plugin.

If you check https://github.com/malsup/form/ you will find that it mentions that this plugin is dependent on XHR 2 for modern browsers (in case of IE it is only possible in IE10+) and for older versions it uses iframes (http://malsup.com/jquery/form/#file-upload).

It is suggested that you check the above link on the iframe part as it involves a bit of understanding of how the server can access the file.

Let us know if it worked and what version of IE you were testing.

Kartik Sehgal
  • 143
  • 2
  • 8
  • This seems more like general instruction and a request for more info than a specific answer to the problem. This should have been a comment. – Sparky Nov 25 '12 at 15:21