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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Pull A Web page Content into My Page? 1

Status
Not open for further replies.

PGMR1998

MIS
Apr 10, 2001
29
0
0
US
Hi, I have a web page that will need to also use the content from a web page on another server. How can I use javascript to pull the content of that url into my page?
 
I am confused. What is the javascript code to reference naother document so that it will show in my window?
 
Adam just told you. Google for AJAX. Use it and a combination of innerHTML to pull the content of a foreign page into your page.

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson
 
That did not answer the question. Perhaps I am not phrasing the question correctly. Something like document.location=myURL should work, but I'm not sure of the correct syntax.
 
Using document.location will redirect the entire page to a new page, the same way clicking a hyperlink will. The way you worded your question made it sound like you wanted to have your own custom page with content from another page pulled into it, so that the content of the 2 pages mixed together. If I am wrong then you need to be more descriptive of what it is you want. If I am right, then the answers above already answered your question.

If you want additional content in your page pulled from another page on another server you are looking at 2 options - frames or AJAX. There is no other special javascript command (like document.location) to do it all for you.

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson
 
Hi j4606, I am much good with javascripting. Helping for you with javascripting I can.

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top