Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load another page.

Status
Not open for further replies.

PaulBarbeau

Programmer
Nov 23, 2000
109
CA
I would like some code in VB or Javascript that will load some content from another website. Anyone have or seen any?
 
Well, your question is not very clear, do you want to replace your page by another one or get another page code to use it in yours (ie : in a frame or an iframe) ? Water is not bad as soon as it stays out human body ;-)
 
iframe works in IE but not netscape but that is what i am trying to do
 
So what type of contener do you want to use ? Water is not bad as soon as it stays out human body ;-)
 
You want to get an html page somewhere on the web and then put it within your own page, right ?
Then you'll got put the code you've retrieved INTO an HTML object in your page.
At this point, you've got two options :

either you put it in a frame or iframe
This case is the simplest because these types of containers can hold an entire html page including it's
Code:
<HTML>
and
Code:
<SCRIPT>
tags. In this case, you just have to set the &quot;src&quot; attribute to the url of the page you want to get.
exemple
Code:
<FRAME src=&quot;[URL unfurl="true"]http://www.tek-tip.com&quot;>[/URL]

either you put it in an other kind of container
exemple <DIV>, <SPAN>, <TD>
This is more difficult because you've got to get only the content of the page to display it as no &quot;src='url' is possible for these kinds of tags.
If you want to do it that way, have a look to the &quot;innerHtml&quot; and &quot;innerText&quot; attributes of the document object.
Water is not bad as soon as it stays out human body ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top