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?
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.