I have a serious issue with my code/browser. I tried to implement solution provided here at SO, but none is working from me. here are some of the one I looked:
- jQuery's $(form).submit() not firing for IE only (MVC3 app)
- jQuery: form not submitting with $("#id").submit(), but will submit with a 'submit' button?
- Form Submit jQuery does not work
My issue is: I have a submit button that is not working on IE11 but when I downgrade the version IE8 using IE Developer Tools it works fine. Any clue? I have half my hair already pulled out since it's been 3 days I am trying to get it work on IE 11. Any idea is welcome.
This is the jquery code:
if (isOtherValid == true) {
formsubmit = true;
$('#StupidForm').submit();
document.StupidForm.submit()
alert('Test');
form.submit();
return true;
}
}
else {
alert('You must select at least 1 CE type');
}
This is my razor view:
@model TCEO.MVC.Person.MyModel
@{
ViewBag.Title = "Course Sign Up";
}
@section Styles {
<link href="@Url.Content("~/Content/enroll_learner_validation.css")" rel="stylesheet" type="text/css" />
}
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<h2>@Model.courseEnrollment.CourseTitle</h2>
<div style="padding-left:25px;">
@{
var namePrint = Model.FirstName;
if (!(Model.MiddleInitial == null) && Model.MiddleInitial.Length == 1)
{ namePrint = namePrint + " " + Model.MiddleInitial + ". "; }
else
{ namePrint = namePrint + " "; }
namePrint = namePrint + Model.LastName;
<span style=" font-size:18px; color:navy;">@namePrint</span>
<br /><br />
}
<h3>Update Your Account</h3>
<span style=" font-size:18px; color:navy;">Verify your information below...</span>
@{ Html.EnableClientValidation(); }
@using (Html.BeginForm("EnrollLearnerValidationCompleteForm", "Course", FormMethod.Post, new { id = "StupidForm" }))
{
@Html.ValidationSummary(true)
<fieldset>
<legend></legend>
@Html.HiddenFor(model => model.LearnerID)
@Html.HiddenFor(model => model.FirstName)
@Html.HiddenFor(model => model.MiddleInitial)
@Html.HiddenFor(model => model.LastName)
@Html.HiddenFor(model => model.AddressLine1)
@Html.HiddenFor(model => model.AddressLine2)
@Html.HiddenFor(model => model.AddressLine3)
@Html.HiddenFor(model => model.City)
@Html.HiddenFor(model => model.CountrySelectedItem)
@Html.HiddenFor(model => model.StateSelectedItem)
@Html.HiddenFor(model => model.ZipCode)
@Html.HiddenFor(model => model.courseEnrollment.AdjustRecord)
@Html.HiddenFor(model => model.Email)
</fieldset>
}