title: How to open a bootstrap modal with an iframe that shows variable url
body: <p>I have a normal large bootstrap modal:</p>
  
  <pre><code>&lt;div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
    &lt;div class="modal-dialog modal-lg"&gt;
      &lt;div class="modal-content"&gt;
        &lt;div class="modal-header"&gt;
          &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt;
          &lt;h4 class="modal-title" id="myModalLabel&gt;Google.com&lt;/h4&gt;
        &lt;/div&gt;
        &lt;div class="modal-body"&gt;
        &lt;iframe src="https://google.com" width="90%" height="90%" frameborder="0" allowtransparency="true"&gt;&lt;/iframe&gt;
        &lt;/div&gt;
        &lt;div class="modal-footer"&gt;
        &lt;a type="button" class="btn btn-primary"  href="https://google.com" target="_blank"&gt;Go to actual page&lt;/a&gt;
          &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;!-- /.modal-content --&gt;
    &lt;/div&gt;
    &lt;!-- /.modal-dialog --&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>That contains an Iframe. I want to make a function that opens a the above modal, but I want the function to be able to change the src of the iframe(it is <a href="https://google.com" rel="nofollow">https://google.com</a>), as well as the button that links to the actual page, to be the url parameter of the function, and the title(which says google.com), to be whatever is in the title parameter of the function. I don't really know how to get started with this. Would the best way be to use document.write(), and then store the information in cookies? or some other way.</p>
  
  <pre><code>function openModal(url, title) {
    //code
  }
  </code></pre>