943,739 Members | Top Members by Rank

Ad:
Mar 18th, 2009
0

Get the output of a webpage and assign it to a Div...

Expand Post »
Does anyone know of a way to retrieve the output of a webpage and place the output in the current web page (not using iframes)?

For example, here is a simple web page (test.html):

<html>
This is just a test
</html>

I would like to take the output of this page and insert into my current page:

<div id="test">
This is just a test
</div>

Thanks in advance,

Mapper
Reputation Points: 10
Solved Threads: 0
Light Poster
Mapper99 is offline Offline
42 posts
since Apr 2008
Mar 18th, 2009
0

Re: Get the output of a webpage and assign it to a Div...

Would something like this work:

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. function testIIS(){
  2. var http1 = getHTTPObject();
  3. http1.open("GET", "http://devsptl/test2/test.txt", true);
  4.  
  5. http1.onreadystatechange = function() {
  6. if (http1.readyState == 4) {
  7. alert(http1.responseText);
  8. }
  9. }
  10.  
  11. }
Reputation Points: 10
Solved Threads: 0
Light Poster
Mapper99 is offline Offline
42 posts
since Apr 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Popup Window from parent window
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: is it possible to retrieve manufacturer information using javascript?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC