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

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Apr 2008
Posts: 31
Reputation: Mapper99 is an unknown quantity at this point 
Solved Threads: 0
Mapper99 Mapper99 is offline Offline
Light Poster

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

 
0
  #1
Mar 18th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 31
Reputation: Mapper99 is an unknown quantity at this point 
Solved Threads: 0
Mapper99 Mapper99 is offline Offline
Light Poster

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

 
0
  #2
Mar 18th, 2009
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. }
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC