Advertisement
AMONRA75

JS - BOOTSTRAP MODAL IFRAME

Jun 12th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. js
  2. ----------------
  3. $('.btnchart').unbind('click');  
  4.     $('.btnchart').click(function(){
  5.    
  6.             var adminid = $(this).data('id');
  7.             //alert(adminid);
  8.             $('#chartmodal .modal-body').html('<iframe src="chatp.php?pair='+adminid+'" width="1015" height="640" scrolling="no" seamless="seamless" frameBorder="0"></iframe>');
  9.             $('#chartmodal').modal({show:true});
  10.                    
  11.       });
  12.  
  13. html
  14. ----------------------
  15. <!DOCTYPE html>
  16. <html lang="en">
  17.   <head>
  18.     <meta charset="utf-8">
  19.     <title>title</title>
  20.     <link rel="stylesheet" href="style.css">
  21.     <script src="script.js"></script>
  22.   </head>
  23.   <body>
  24.    
  25.  
  26.  
  27.  
  28. <!-- TradingView Widget BEGIN -->
  29. <div class="tradingview-widget-container">
  30.   <div id="tradingview_b1a12"></div>
  31.   <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
  32.   <script type="text/javascript">
  33.   new TradingView.widget(
  34.   {
  35.   "width": 980,
  36.   "height": 610,
  37.   "symbol": "BINANCE:<?php echo $a = $_GET['pair'] ? $_GET['pair'] : "BNBUSDT"; ?>",
  38.   "interval": "D",
  39.   "timezone": "Etc/UTC",
  40.   "theme": "Dark",
  41.   "style": "1",
  42.   "locale": "it",
  43.   "toolbar_bg": "#f1f3f6",
  44.   "enable_publishing": false,
  45.   "allow_symbol_change": true,
  46.   "container_id": "tradingview_b1a12"
  47. }
  48.   );
  49.   </script>
  50. </div>
  51. <!-- TradingView Widget END -->
  52.  
  53.  
  54.   </body>
  55. </html>
  56.  
  57. bootstrap
  58. --------------
  59. <div class="modal fade" id="chartmodal" tabindex="-1" role="dialog" aria-labelledby="chartmodalLabel" aria-hidden="true">
  60.   <div class="modal-dialog" role="document" style="width:1055px; height:660px; background-color: #31353D;max-width: none;">
  61.     <div class="modal-content">
  62.       <div class="modal-header">
  63.         <h5 class="modal-title" id="chartmodalLabel"><span style="color: white;"><strong>CHART</strong></span></h5>
  64.         <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  65.           <span aria-hidden="true">&times;</span>
  66.         </button>
  67.       </div>
  68.       <div class="modal-body" style="width: 1055px; height: 660px;">       
  69.       </div>
  70.       <div class="modal-footer">
  71.         <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
  72.       </div>
  73.     </div>
  74.   </div>
  75. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement