I have a Modal Popup (Bootstrap) that displays content based on user selection
- I used this as my link, also added this to my script section on the aspx page
This is the javascript code that I used to test user selection
PlayerMP.getFunctionalDetails = function (type, UserID, SessionID, SessionNo) { $.ajax({ type: "GET", url: PlayerMP.URL, data: "rt=4&type=" + type + "&UserID=" + UserID + "&SessionID=" + SessionID + "&SessionNo=" + SessionNo, success: function (FunctionalSplitsJS) { if (FunctionalSplitsJS.indexOf("SessionExpired=1", 0) == -1) { $("#divFunctionalDetails").html(FunctionalSplitsJS); switch (type) { case 1: $("#divFunctionalsSplit"); //the table goes out of the modal window break; case 2: TallyFunctionalSheet(); $("#divFunctionalsSplit"); break; case 3: $("#divFunctionalsSplit"); break; } $("#divFunctionalsSplit").modal('show'); } else window.location.href = "../Login.aspx?SessionExpired=1"; } }); }
- In the first case, there is a table that should be displayed inside the modal popup, but the table goes beyond the modal window (there is a problem with the width of the modal window, but
table-responsive seems to work). when I resize the browser to fit the width of the tablet, the size of the table / modal auto changes to fit each other. - The widths of the 2nd and 3rd modality bodies seem to work fine.
This is the code for a modal window called
<div class="modal fade" id="divFunctionalsSplit" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-body"> <div class="table-responsive"> <div id="divFunctionalDetails"></div> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-primary" data-dismiss="modal">Done</button> </div> </div> </div> </div>
- Fullscreen browser

- Modified browser

javascript css twitter-bootstrap-3 modal-dialog
jayeshkv
source share