<div class="gmail_quote"><div>It should work with javascript as normal (at least a quick test page did that included jquery from Google&#39;s CDN and then operating on the dom).</div><div><br></div><div>You&#39;re right that drupal_http_request gets everything including any html, css etc and you&#39;re at the mercy of how well-formed they are. You could either create versions of the pages which just output the exact html you want (e.g. ignoring &lt;html&gt; and &lt;head&gt; tags) or you could manipulate it back in drupal (explode on &quot;body&gt;&quot;?). You could optionally run it through something like HTML Purifier (can you run stuff functionally through Drupal&#39;s filters?) if you don&#39;t trust your content.</div>
<div><br></div><div>Anyway - it was just a thought based on what could be a quick and dirty solution.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
------------------------------<br>
<br>
Message: 3<br>
Date: Tue, 21 Jun 2011 16:06:18 -0700<br>
From: &quot;Metzler, David&quot; &lt;<a href="mailto:metzlerd@evergreen.edu">metzlerd@evergreen.edu</a>&gt;<br>
Subject: Re: [support] Integrating completely unrelated pages into<br>
        Drupal<br>
To: &lt;<a href="mailto:support@drupal.org">support@drupal.org</a>&gt;<br>
Message-ID:<br>
        &lt;<a href="mailto:52177C930FA90F4D9888B0343FDB79FB0277E52D@birch.evergreen.edu">52177C930FA90F4D9888B0343FDB79FB0277E52D@birch.evergreen.edu</a>&gt;<br>
Content-Type: text/plain; charset=&quot;us-ascii&quot;<br>
<br>
This is a clever idea, but be warned that the embedded javascript is not<br>
likely to render or &quot;include&quot; properly, and unless you run this through<br>
an html filter likely to cause malformed html.  IIRC the data property<br>
returned includes all of the data including headers, html head, body<br>
tags css references etc.<br>
<br>
<br>
<br>
Someone please correct me if I am wrong.<br>
<br>
<br>
<br>
Dave<br>
<br>
<br>
<br>
________________________________<br>
<br>
From: <a href="mailto:support-bounces@drupal.org">support-bounces@drupal.org</a> [mailto:<a href="mailto:support-bounces@drupal.org">support-bounces@drupal.org</a>] On<br>
Behalf Of DTH<br>
Sent: Tuesday, June 21, 2011 3:47 PM<br>
To: <a href="mailto:support@drupal.org">support@drupal.org</a><br>
Subject: Re: [support] Integrating completely unrelated pages into<br>
Drupal<br>
<br>
<br>
<br>
Maybe kludgy, but could be very quick to do depending on your structure:<br>
in a custom module:<br>
<br>
<br>
<br>
/**<br>
<br>
 * Implementation of hook_menu().<br>
<br>
 */<br>
<br>
 function example_menu() {<br>
<br>
<br>
<br>
  $items[&#39;test/page&#39;] = array(<br>
<br>
    &#39;title&#39; =&gt; &#39;Test Page Title&#39;,<br>
<br>
    &#39;page callback&#39; =&gt; &#39;test_page&#39;,<br>
<br>
            &#39;access arguments&#39; =&gt; array(&#39;access content&#39;),<br>
<br>
            &#39;type&#39;=&gt;MENU_NORMAL_ITEM<br>
<br>
  );<br>
<br>
<br>
<br>
  return $items;<br>
<br>
}<br>
<br>
<br>
<br>
function test_page(){<br>
<br>
            $request =<br>
drupal_http_request(&quot;<a href="http://www.example.com/pages/test.php" target="_blank">http://www.example.com/pages/test.php</a>&quot;);<br>
<br>
            return $request-&gt;data;<br>
<br>
}<br>
<br>
<br>
<br>
<br>
<br>
        Date: Tue, 21 Jun 2011 12:29:20 -0500<br>
        From: Scott Massey &lt;<a href="mailto:scott.massey@gmail.com">scott.massey@gmail.com</a>&gt;<br>
        Subject: [support] Integrating completely unrelated pages into<br>
Drupal<br>
        To: <a href="mailto:support@drupal.org">support@drupal.org</a><br>
        Message-ID: &lt;<a href="mailto:BANLkTik7m%2BC8r1-MrBdG1OG2zkgvxovQWA@mail.gmail.com">BANLkTik7m+C8r1-MrBdG1OG2zkgvxovQWA@mail.gmail.com</a><br>
&lt;mailto:<a href="mailto:BANLkTik7m%252BC8r1-MrBdG1OG2zkgvxovQWA@mail.gmail.com">BANLkTik7m%2BC8r1-MrBdG1OG2zkgvxovQWA@mail.gmail.com</a>&gt; &gt;<br>
        Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
        Hi!<br>
<br>
        I am about 6 months into Drupal and enjoy it immensely. I am<br>
putting<br>
        together a portfolio of some web development I have done and<br>
have several<br>
        pages of data visualiztions using php and a javascript library<br>
called<br>
        Protovis. If I want to bring that into drupal as a page, is<br>
there a way to<br>
        do that? There are library calls, jquery, etc. I am having<br>
trouble wrapping<br>
        my head around how to do it. I would like the pages to be a menu<br>
item that<br>
        opens a page within the drupal site. Here is an example of a<br>
page:<br>
        <a href="http://modernamericanman.com/ids499/protovis7.php" target="_blank">http://modernamericanman.com/ids499/protovis7.php</a><br>
<br>
        Thanks!<br>
<br>
        Scott<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.drupal.org/pipermail/support/attachments/20110621/a63c514c/attachment-0001.html" target="_blank">http://lists.drupal.org/pipermail/support/attachments/20110621/a63c514c/attachment-0001.html</a><br>
</blockquote></div>