asked on
$(document).on("click", '#submitOrder', function () {
var isValid = false;
// Step 1. Disable Submit button
$(this).prop('disabled', true);
$(".bhiErrorInput").css({ 'display': 'none' });
// Step 2. Update text on submit Button
$(this).val("Processing...");
// Step 3. Disable all form fields
$("input[type=text]").prop('disabled', true);
$("select").prop('disabled', true);
// Step 4. Grey out the Screen
$('#thickBoxGreyScreen').css({ opacity: 0.7, 'width': $(document).width(), 'height': $(document).height() });
$('body').css({ 'overflow': 'hidden' });
$('#thickBoxInfoPane').css({ 'display': 'block' });
isValid = validateOrder(); // set of methods that return true or false
if (!isValid) {
$('#thickBoxGreyScreen').css({ 'display' : 'none' })
$('#thickBoxInfoPane').css({ 'display': 'none' })
$(this).val("Submit Order");
$("input[type=text]").prop('disabled', false);
$("select").prop('disabled', false);
$(this).prop('disabled', false);
}
else {
$("input[type=text]").prop('disabled', false);
$("select").prop('disabled', false);
}
event.returnValue = isValid;
return isValid;
}); // end of $(document).on("click", '#submitOrder', function () {
@using (Html.BeginForm("PartnerCartSubmit", "Partner", FormMethod.Post, new { id = "PartnerCartForm" }))
{
@Html.AntiForgeryToken()
if (!String.IsNullOrEmpty(ViewBag.ErrorMessage))
{
<div class="bhiErrorBar">
@Html.Raw(ViewBag.ErrorMessage)
</div>
}
<h1 class="standardText">Addresses</h1>
<div id="bhiAddressDiv">
<div class="bhiAddressDetail">
...
... // HTML of the form removed for simplification.
...
</div>
<input type="submit" value="Submit Order" id="submitOrder" />
<div class="clear"></div>
<div id="thickBoxInfoPane">
<p>Your payment is being processed...</p>
</div>
<div id="thickBoxGreyScreen"></div>
}
ASKER
ASKER
ASKER
ASKER
The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications
TRUSTED BY
Open in new window