简体   繁体   中英

Button for modal does nothing when clicked

I created a button that references a modal but it doesn't open the modal at all. This area of code isn't my realm, SQL is. This code actually lives in an SQL procedure that is called when interacting with a website.

Thoughts?

--Remove package item, Modal Popup
    <div id="delete_btn_modal" class="modal fade" role="dialog">
        <div class="modal-dialog">
            <div class=modal-body>
                <h3><font color="red" align="center">Are you sure?</h3></font></br>
                <p>Deleting a package item will remove the entire package</br></br>
                    <button type="button" class="btnStyle" data-dismiss="modal">Close</button> 
                    <button type="button" class="btnStyle" onclick=location.href="http://wowfestival.lajollaplayhouse.org/cart/precart.aspx?p=499">Delete Package</button>
                </p>
            </div>
        </div>
    </div>

--button
        <button type="button" class="btnStyle" data-toggle="modal" data-target="#delete_btn_modal">Delete</button>

Seems you have not added bootstrap javascript

Your code is perfect and fine

Check the bootply for your code. : http://www.bootply.com/zOa8UJ4Vfb

Also check you you have jQuery included as well .

If not use below cdn for quick test.

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
  <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM