0

HTML

<form action="includes/photos.php" id="joinPhotoUploadForm" enctype="multipart/form-data">
  <input type="file" name="file" id="file"><br>
</form>

Jquery

$('div#photoCropContainer').click(function() {
  $('input#file').trigger('click');
});

And

$(document).on('change','input#file', function() {
    alert('ready to upload');
    $('form#joinPhotoUploadForm').submit();
});

When someone clicks the Div@photoCropContainer it trigers a click on the file input, shows the popup and sends the file. This works on FF & Chrome.

On IE9 however I always get the popup but no other reply...

Can anyone give me any advise?

thanks

M Khalid Junaid
  • 62,293
  • 9
  • 87
  • 115
Adam
  • 18,593
  • 35
  • 115
  • 195

1 Answers1

0

As I can see in IE9 console "access denied" on form submit line, thats why nothing works. Look at this question ie javascript form submit with file input

Community
  • 1
  • 1
webdeveloper
  • 16,936
  • 3
  • 47
  • 47