Close Bootstrap Modal Popup on HTML Button Click using data-dismiss

Last Reply on Dec 15, 2017 12:42 AM By dharmendr

Posted on Dec 12, 2017 10:10 PM

i have a problem. i use this code

      $('#myModal').modal({ backdrop: 'static', keyboard: false })

But if click outside the modal it close. I need to close only with button because i need the info that give me the moda.

<div id="myModal" class="modal" data-keyboard="false" data-backdrop="static">
    <!-- Modal content -->
        <div class="modal-content" data-backdrop="static">
            <div class="modal-header header-cvv">
                <span class="close">×</span>
                <h2>Please enter the CVV number</h2>
            <div class="modal-body">
                @Html.Label(SantaFeCounty.Resources.Home.CVVValidation, new { @style = "display:none; font-weight:100;", @class = "text-danger field-validation-error", id = "lblCVV" })
                <br />
                <input type="text" id="cvv" maxlength="4" autofocus required />
            <div class="modal-footer">
                <div id="buttons">
                    <input class="btn btn-primary" type="submit" value="Process" onclick="submitForm() " />
                    <button class="btn btn-primary" value="" onclick="javascript: = 'none'; return false;" style="cursor: pointer; width: 150px;">Cancel</button>

plz help me

This question does not have replies that have been liked.