title: Open html page in a BootstrapDialog
body: <p>In my Spring projet, I have a navigation bar where I have the follow links:</p>
  
  <pre><code>&lt;div class="navbar navbar-inverse navbar-fixed-top" role="navigation"&gt;
        &lt;div class="container"&gt;
          &lt;div class="navbar-header"&gt;
            &lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"&gt;
              &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt;
              &lt;span class="icon-bar"&gt;&lt;/span&gt;
              &lt;span class="icon-bar"&gt;&lt;/span&gt;
              &lt;span class="icon-bar"&gt;&lt;/span&gt;
            &lt;/button&gt;
            &lt;a class="navbar-brand" href="#"&gt;LigaDesportiva&lt;/a&gt;
          &lt;/div&gt;
          &lt;div class="collapse navbar-collapse"&gt;
            &lt;ul class="nav navbar-nav"&gt;
              &lt;li&gt;&lt;a href="clube.html"&gt;Clubes&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="dirigente.html"&gt;Dirigentes&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="jogadore.html"&gt;Jogadores&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="liga.html"&gt;Ligas&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="usuario.html"&gt;Usu&amp;aacute;rios&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
              &lt;ul class="nav navbar-nav navbar-right"&gt;
                  &lt;li class="dropdown"&gt; &lt;a class="dropdown-toggle" data-toggle="dropdown"&gt;${usuario.nome} &lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;
                      &lt;ul class="dropdown-menu"&gt;
                          &lt;li&gt;&lt;a href="usuario_perfil.html"&gt;Perfil&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a href="usuario_historico.html"&gt;Hist&amp;oacute;rico&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a href="logout.html"&gt;Sair&lt;/a&gt;&lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;&lt;!--/.nav-collapse --&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>I need each link open in a BootstrapDialog like the below, available in the site <a href="http://www.jqueryrain.com/?iFhFXJv3" rel="nofollow">http://www.jqueryrain.com/?iFhFXJv3</a>:</p>
  
  <pre><code>BootstrapDialog.show({
              title: 'Draggable Dialog',
              message: 'Try to drag on dialog title to move your dialog.',
              draggable: true
          });
  </code></pre>
  
  <p>For this, I need three things:</p>
  
  <p>1) load the content of the file in a javascript variable
  2) capture the title of the page from tag  and use as title of the window
  3) capture the 'body' section from the page and use as message for the window</p>
  
  <p>I try this:</p>
  
  <pre><code>$("a").click(function(){
     var url = $(this).attr("href");
     var destino = load(url);
     var title_page = $(destino).filter("title").text();
     var message_page = $(destino).filter("body").text();
     BootstrapDialog.show({
              title: $(title_page),
              message: $(message_page),
              draggable: true
          });
  });
  </code></pre>
  
  <p>But don't work. What I made wrong? The console of the browser don't show any error, but the page isn't opening in the dialog.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I change the code used to this, but still don't work.</p>
  
  <pre><code>function load_page(url) {
      var responseText = '&lt;div&gt;&lt;/div&gt;';
      $(responseText).load(url);
      var title_text = $(responseText).attr("title").text();
      var message_text = $(responseText).attr("body").text();
      BootstrapDialog.show({
          title: $(title_text),
          message: $(message_text),
          draggable: true
      });
  }
  </code></pre>
  
  <p>But in the console of the browser (Firefox) this error is displayed when I click on the link:</p>
  
  <pre><code>TypeError: $(...).attr(...) is undefined
  </code></pre>
  
  <p>Someone knows how I can finally be able to capture and handle de content of target page?</p>