|
<div id="customWaiting"></div>
<ej-waiting-popup id="customWaiting" show-on-init="false" />
@{
var attributesTracker = new Dictionary<string, object>();
attributesTracker.Add("Id", "TrackerForm");
}
@{Html.BeginForm("MasterTracker", "Dialog", FormMethod.Post, new { id = "TrackerForm" });
{
// has controls that are used for report options
// at the end there is a button that calls some javascript
<input class="buttonStyle" type="button" value="Run" onclick="runTracker()" ; />
}
}
<script>
function runTracker() {
var objForm = document.getElementById("TrackerForm");
if (objForm) {
// does a little validating and if everything is good it calls submit() which causes the method in the controller to run and produce the report
var popupobj = $("#customWaiting").data("ejWaitingPopup");
popupobj.show();
objForm.submit(function () {
popupobj.hide();
});
}
}
</script>
|