And the following JavaScript code:
- $('#form0').ajaxForm({
- url: sourceUrl,
- type: 'POST',
- data: formdata,
- target: '#FileField',
- success: function (data) {
- if($(data).find('#RouteMidDetails').length >= 0) {
- $('#divSearchPopupContent').html(data);
- if($('#hdnModelState').val() == 'True') {
- DisablePopup();
- grid.rebind();
- } else if($('#hdnModelState').val() == undefined) {
- DisablePopup();
- window.location = loginUrl;
- }
- } else {
- window.location = loginUrl;
- }
- },
- error: function (req, textStatus, errorThrown) {
- window.location = ErrorUrl;
- }
- }).submit();
The form is basically a partial view (i.e pop-up). When validation is true, the form is serialized properly and is submitted, however, it doesn't serialize the form data after validation fails. #Filefield is a file upload text box. This works perfectly fine in Firefox and Chrome but not in IE9.
Please let me know how to fix this issue.
Many thanks in advance :)