Using javascript pass form variables to iframe src
Open PDF in Bootstrap Modal Window This tutorial shows How to pass a JavaScript/jQuery variable to bootstrap modal view and sets it to iframe src attribute. It passes value dynamically to src attribute of the iframe. When the user clicks a link, it opens the URL in a popup window. This code shows the PDF in a Model without download option by hiding the toolbar. To show PDF toolbar in modal, just add #toolbar=1 in the above script. index.php <!DOCTYPE html> <html lang= "en" > <head> <title>Bootstrap Model with PDF Example - coding-zon</title> <meta charset= "utf-8" > <meta name= "viewport" content= "width=device-width, initial-scale=1" > <link rel= "stylesheet" href= "https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" > <script src= "https://cdn.jsdelivr.net/npm/jquery@3.6.1/dist/jquery.slim.