Forums

html modal question

In my project there is a html modal function. When I click a button, a modal will pop up. This function works very well in my PC, however, in pythonanywhere, clicking the button won't trigger the modal. Just want to know if you can give any hints about this. thank you! Below is the html code

<button id = 'select_btn' type="submit" class="btn btn-success" data-toggle="modal" data-target="#exampleModal" {{msg.2}}>PICK</button>

<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Your List</h5>

      </div>
      <div class="modal-body">


            <p id="checkid" name = "stockcode"></p>

      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="submit" class="btn btn-primary" form = "stkform">Save changes</button>
      </div>
    </div>
  </div>
</div>

verify your javascript files are loading, static files configuration et al.

I would also open the browser dev console and check if there are any js errors, and the browser dev network tab to see if any js files are not being loaded.

Thank you for the answers. Indeed there is a syntax error in the html. already resolved.