I'm using JQuery Form Plugin to upload a file together with PHP, everything works perfectly in Firefox, but in Internet explorer is does not do anything if I submit the form.
My code is below
<script type="text/javascript">
<!--
$(document).ready(function() {
var options = {
target: '#message',
url:'../includes/ajax/import.php?import=1',
beforeSubmit: function() {
$('#uploader').html('<div style="padding-top:10%"><center><img src="../domain/images/ajax-loader.gif" border="0" /></center></div>');
$('#message').toggle();
},
success: function() {
$("#message").removeClass("message").addClass("messageResponse");
$('#message').toggle();
$('#uploader').html('');
}
};
$('#upload').ajaxForm(options);
});
//-->
</script>
<div id="message" class="message">
<form name="upload" id="upload" action="#" method="POST" enctype="multipart/form-data">
<table cellpadding="4" cellspacing="4" border="0">
<tr>
<td colspan="3"><h1>Map Clients <i>(Import CSV File)</i></h1></td>
</tr>
<tr>
<td class="fieldLabel" nowrap>File:</td>
<td nowrap><input type="file" name="fileToUpload" id="fileToUpload" /> *</td>
<td nowrap id="errorFile" class="error"></td>
</tr>
<tr>
<td nowrap colspan="3"><button id="mapClients">Map Clients</button></td><td nowrap id="errorFile" class="error"></td>
</tr>
<tr>
<td colspan="3"><input type="hidden" value="1" id="type" name="type" /></td>
</tr>
</table>
</form>
</div>
<div id="uploader"></div>
Now my problem is that I can't figure out why IE 7 is not doing anything when I click on my form submit button