I am having some strange issues with my code as it only works in Internet Explorer 11 (only tested in 11) and it is NOT working in Firefox 25.0.1 or Chrome 31..
I want my form to submit in the iframe so I can handle image uploads in the background.. But I'm not getting far thanks to this issue.
Here's my code:
<form method="post" action="/components/com_jshopping/templates/hb/product/ajax/uploadImage.php" id="uploadImageForm" enctype="multipart/form-data" target="HBUPLOADFRAME">
<input type="hidden" name="uploadImage" value="UPL">
<input type="file" name="image" id="imgUploadFile">
</form>
<iframe name="HBUPLOADFRAME" id="imgUploadFrame" src="/components/com_jshopping/templates/hb/product/ajax/uploadImage.php" height="50" width="300" style="border: 0;"></iframe>
<script type='text/javascript'>
jQuery(document).on('change', '#imgUploadFile', function() {
jQuery("#uploadImageForm").submit();
});
</script>
Thanks in advance!