Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

116
Views
Return a message after submmited form

I have this form in html:

<form action='@Url.Action("ExportExcel", "Banks")' method="post" target="_blank" id="myForm">
    @Html.AntiForgeryToken()

        <input type="hidden" name="typeDetails" id="typeDetails" value="typeDetails.value" />
        <input type="hidden" name="filteredBanksIds" id="filteredBanksIds" value="" />
        <input id="btnExportExcel" type="hidden" value="submit" data-toggle="modal" data-target="#ExportExcelModal" />
</form>

and the modal is:

<div class="modal fade" id="ExportExcelModal" tabindex="-1" role="dialog" aria-labelledby="ExportExcelModalTitle" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="ExportExcelModalTitle">Banks</h5>
                <button type="button" class="close" id="ExportExcelModalClose" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                Would you like to export this banks with details?
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-target="#myModal" value="1" onclick="exportExcel(this.value)">yes</button>
                <button type="button" class="btn btn-primary" data-target="#myModal" value="0" onclick="exportExcel(this.value)">no</button>
            </div>
        </div>
    </div>
</div>

and I have this in JS:

function exportExcel(typeDetails) {
    $('#ExportExcelModalClose').click();
    $('#filteredBanksIds').val(filteredBanks.map(function (bank) { return bank.Id }));
    $('#typeDetails').val(typeDetails);
    $("#myForm").submit;
    return true;
    }

I would like that in addition to what happens on the server side (Excel export and download),

also a message will be returned to the user after the Excel export ends, with custom message from the server.

How can I add this?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!