Rommeo Posted August 15, 2018 Share Posted August 15, 2018 I m trying to use a template, in one of the page there is a modal inserted in the code, so it works correctly if i just unzip the template and click an item ( a modal pop up window appears and all buttons work well. ) But I need to use the db, so that I have tried to fill the modal from an external php file, it also works, I m able to fill the fields in modal, but jquery/bootstrap buttons not working at this time. Here is my code; html: (where I call the model ) <a href="#" data-href="http://www.mywebsite.com/info.php?id=4" class="block2-btn flex-c-m stext-103 cl2 size-102 bg0 bor2 hov-btn1 p-lr-15 trans-04 js-show-modal1"> Check </a> jquery ; $('.js-show-modal1').on('click',function(e){ e.preventDefault(); var dataURL = $(this).attr('data-href'); $('#myproinfo').load(dataURL,function(e){ $('.js-modal1').addClass('show-modal1'); }); }); $('.js-hide-modal1').on('click',function(){ $('.js-modal1').removeClass('show-modal1'); }); modal : <!-- content tables are here --> <!-- modal part here --> <div class="wrap-modal1 js-modal1 p-t-60 p-b-20"> <div class="overlay-modal1 js-hide-modal1"></div> <div class="container"> <div class="bg0 p-t-60 p-b-30 p-lr-15-lg how-pos3-parent"> <button class="how-pos3 hov3 trans-04 js-hide-modal1"> <img src="images/icons/icon-close.png" alt="CLOSE"> </button> <div class="row" id="myproinfo"> <!-- DATA GOES HERE --> </div> </div> </div> </div> <!-- jquery, bootstrap etc includes here --> info.php; $query = "Select * data .. etc."; for($i=0) echo " <tr> <td><img src="'.$photo[$i].'" alt="IMG-PRODUCT"></td> <td>'$name[$i]'</td> <td>'$title[$i]'</td> </tr> How can I solve this? Thank you in advance for your replies. Quote Link to comment https://forums.phpfreaks.com/topic/307614-javasript-functions-not-working-in-bootstrap-modal-popup-window/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.