When calling Modal, screen is displayed and disappears and the execution continues

Asked

Viewed 88 times

0

The idea of Modal is a screen that is displayed and the screen below is disabled and the execution of the program only follows after closing the Modal. With me it looks like this. Modal is displayed and the program closes it alone and the execution of the program follows. This is the modal

<!-- Modal -->
  <div class="modal fade" id="myModal" role="dialog">
    <div class="modal-dialog">

      <!-- Modal content-->
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal">&times;</button>
          <h4 class="modal-title">Modal Header</h4>
        </div>
        <div class="modal-body">
          <p>Some text in the modal.</p>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        </div>
      </div>

    </div>
  </div>

</div>

And I did it on the button

<input type="submit" class="btn btn-verde wd-270 f-right" value="Salvar" onclick="startLoading();" data-toggle="modal" data-target="#myModal" />

How to avoid automatic execution, follow only when I close Modal?

  • Your tags are wrong, because bootstrap, Js...?

  • 1

    What this startLoading() function does?

  • It was already in the system, only one loading. This system already existed, I am only giving maintenance and need to put a Modal

  • IF the subject is modal, that is CSS and you are using the bootstrap classes, if you use the correct tags it will be easier to find people to help you

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.