I have a script that trigger when the submit button is clicked.
It has a return confirm javascript. If the user clicks OK, it works fine, but if they click CANCEL, it still triggers by rolling the spinner continuously.
Please help.
Below is the code snippet:
//submit search, display loading message
$('#searchbtn').click(function () {
$('.spinner').css('display', 'block');
});
The below is the HTML for those asking.
@using (Html.BeginForm("AllLoanProcessed", "Transactions", new { area = "Transactions" }, FormMethod.Get , new { id = "formID" }))
{
Search By:
@Html.RadioButton("searchBy", "Account_Number", true) Account Number
@Html.RadioButton("searchBy", "Surname") Surname
@Html.TextBox("search", null, new { placeholder = "Search Value", @class = "form-control" })
}