How to open a link inside a pop up?
<p>In the following code I have placed following link inside the popup:</p>

<pre><code>&lt;p&gt;&lt;a href="http://www.google.com"&gt;Go to google!&lt;/a&gt;&lt;/p&gt;
</code></pre>

<p>When I clicked on the link, google.com loads but its consumes entire HTML page. I want it to just open inside the pop up, without harming parent document body. How can I achieve this?</p>

<pre><code>   &lt;!DOCTYPE html&gt;
    &lt;html&gt;
    &lt;head&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
    &lt;link rel="stylesheet"   href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css"&gt;
    &lt;script src="https://code.jquery.com/jquery-1.11.3.min.js"&gt;&lt;/script&gt;
    &lt;script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;

    &lt;div data-role="page"&gt;
      &lt;div data-role="header"&gt;
       &lt;p&gt;&lt;a href="http://www.google.com"&gt;Go to google!&lt;/a&gt;&lt;/p&gt;
      &lt;/div&gt;

      &lt;div data-role="main" class="ui-content"&gt;
        &lt;a href="#myPopupDialog" data-rel="popup" data-position-to="window" data-transition="fade" class="ui-btn ui-corner-all ui-shadow ui-btn-inline"&gt;Open Dialog Popup&lt;/a&gt;

        &lt;div data-role="popup" id="myPopupDialog"&gt;
          &lt;div data-role="header"&gt;
            &lt;h1&gt;Header Text&lt;/h1&gt;
          &lt;/div&gt;

          &lt;div data-role="main" class="ui-content"&gt;
            &lt;h2&gt;Welcome to my Popup Dialog!&lt;/h2&gt;
            &lt;p&gt;&lt;a href="http://www.google.com"&gt;Go to google!&lt;/a&gt;&lt;/p&gt;
            &lt;a href="#" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-b ui-icon-back ui-btn-icon-left" data-rel="back"&gt;Go Back&lt;/a&gt;
          &lt;/div&gt;

          &lt;div data-role="footer"&gt;
            &lt;h1&gt;Footer Text&lt;/h1&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div data-role="footer"&gt;
        &lt;h1&gt;Footer Text&lt;/h1&gt;
      &lt;/div&gt;
    &lt;/div&gt; 
</code></pre>