I have this html code
<form method="post" id="upload_video" enctype="multipart/form-data" action="/Home/Save"> <div id="form_box"> <input type="text" name="name" id="name" value="" style="color: rgb(0, 0, 0);"><br> <input type="text" name="email" id="email" value="" style="color: rgb(0, 0, 0);"><br> <input type="text" name="mobile" id="mobile" value="Κινητό" style="color: rgb(0, 0, 0);"><br> <input type="checkbox" id="checkbox"> </div> <input type="file" name="file" id="upload_file" style="position:absolute;top:-100px;"> </form> <div id="upload"></div> and i want by clicking the #upload div then to automaticallu=y select file, and when i do it then submit my form. So i have this script
$('#upload').click(function () { $('#upload_file').click(); }); $("#upload_file").change(function () { $('#upload_video').submit(); }); The $('#upload_file').click() event works great in all browsers but the $('#upload_file').change() works only in FF and Chrome but not in IE. So my form is submitted only in FF and Chrome..
Any ideas?