bootstrap-modal

Bootstrap 4.1.3 modal body retains jquery returned data. How to clear cache for each new request?

时间秒杀一切 提交于 2019-12-02 03:58:44
I have a form that submits data via jquery which is then shown via bootstrap modal. However, the problem is that, if I quickly try to give new values to the form then the modal body sometimes doesn't show freshly calculated values but shows the old cached values. How can I destroy the modal cache data in bootstrap 4 ? I have tried various bootstrap3 tips but it just wouldn't work and I still see old cached data intermittantly. Here is what I tried. $('#modalForm').on('hidden.bs.modal', function () { $('#modal_content').empty(); $('#modalForm').modal('dispose'); $(this).find('form').trigger(

Bootstrap modal header and footer not rendered

六眼飞鱼酱① 提交于 2019-12-02 00:33:30
I am displaying an edit form in a bootstrap modal. Using asp mvc5, I am returning a partial view into a bootstrap modal window. The form shows up, fills with data and posts just fine. Only issue is the header and footer do not display. The code shows up in "view page source" but not in the elements tab of the web dev inspector (chrome). I plan to have multiple different modals on this one page, so I am using a placeholder in the _layout page for the modal, then passing in different partial views. placeholder in layout: <body> @*Container for modal windows*@ <div class="modal fade" id="modal

How can I close modal after click save button in vue component?

て烟熏妆下的殇ゞ 提交于 2019-12-01 23:38:45
My vue component like this : <template> <div ref="modal" class="modal" tabindex="-1" role="dialog"> <div class="modal-dialog" role="document"> <div class="modal-content"> <form> ... <div class="modal-footer"> ... <button type="button" class="btn btn-success" @click="addPhoto"> Save </button> </div> </form> </div> </div> </div> </template> <script> export default { ... methods: { addPhoto() { const data = { id_product: this.idProduct }; this.$store.dispatch('addImageProduct', data) .then((response) => { this.$parent.$options.methods.createImage(response) }); }, } } </script> If I click button

How to pass current row value in modal?

眉间皱痕 提交于 2019-12-01 23:31:00
问题 I am perfoming PHP CRUD operations on a table. When i click the edit button rather then taking it to a new page i want to show the values in a modal. I want the value's to be displayed in the modal's form. I have created a modal but i am unable to think of an logic to pass the values of the row in which the edit button was clicked. Any help would be highly appreciated. Table: <table class="table datatable-basic table-bordered table-hover"> <thead> <tr class='active'> <th><b>S.No.</b></th> <th

Modal doesn't show up using bootstrap

江枫思渺然 提交于 2019-12-01 21:01:36
Whenever I press the button , the modal just won't show up, I tried so many things even creating a custom.js to put this code in $('#myModal').modal('show'); But it just doesn't work, Where did i do wrong? Here's the code <html> <head> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> </head> <body> <!-- Button --> <button type="button" class="btn btn-success" data-toggle="modal" data-target="#myModal">Get Started</button> <!-- Modal --> <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class

Programmatically toggle bootstrap 3 navigation bar

孤者浪人 提交于 2019-12-01 18:14:29
I am using few items in my bootstrap 3 navigation bar grouped in like below: <nav class="navbar navbar-inverse navbar-fixed-top" id="toggleNav" role="navigation"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#">Brand name</a> </div> <!-- Collect the nav links, forms,

angular material md-datepicker inside bootstrap modal

…衆ロ難τιáo~ 提交于 2019-12-01 15:42:34
I am tring to use Angular material md-datepicker inside a Bootstrap modal but, on clicking the date the modal popup hides. How can i solve that problem? <div class="modal fade " tabindex="-1" role="dialog"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close forVideoStop" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title">Introduction video for body composition ...</h4> </div> <div class="modal-body"> <md-datepicker ng-model="myDob" md-placeholder="Enter date

How to use Javascript to manipulate modal content?

时光毁灭记忆、已成空白 提交于 2019-12-01 14:45:43
I am using bootstrap modals and Ruby on Rails. I was able to display the modal fine but I am having trouble using Javascript to manipulate the contents of the modal. I am not sure what I am doing wrong but I was not able to use Javascript to impact the contents of the modal at all, to the point that I started wondering if there are such a thing as different stack levels on the DOM elements or whether even the modal contents are part of the DOM. Here is my app/views/home/index.haml: - url = @entry.class.to_s.downcase.singularize = link_to(send("#{url}_path", @entry), remote: true) do = yield

Bootstrap Modal button not working, only on iOS

一笑奈何 提交于 2019-12-01 11:09:05
I have this Bootstrap Modal on my website that is working on everything, but Apple iOS. Has anyone bumped into this/ have any thoughts of where to start in order to fix this? I have tried troubleshooting with an emulator and that seems to be working fine, just the Iphone doesn't seem to work. Here is the button and modal, please let me know if you need any more information or for me to clarify. Thank you!! <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet

Bootstrap Modal button not working, only on iOS

喜夏-厌秋 提交于 2019-12-01 09:26:06
问题 I have this Bootstrap Modal on my website that is working on everything, but Apple iOS. Has anyone bumped into this/ have any thoughts of where to start in order to fix this? I have tried troubleshooting with an emulator and that seems to be working fine, just the Iphone doesn't seem to work. Here is the button and modal, please let me know if you need any more information or for me to clarify. Thank you!! <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"><