Reputation: 171
Say I there's mypage.html and otherpage.html
otherpage.html has some content <p>content is content</p>
I want a javascript that can fetch the content from otherpage.html and paste it in mypage.html
Is there a javascript that can accomplish this? thanks.
Upvotes: 0
Views: 421
Reputation: 120400
From the title, it appears that otherpage.html is in a different domain. This being the case this is not possible in the browser (there's a few exceptions with flash/java/silverlight). If the page is in the same domain, it's easy. Take a look at jQuery.get.
Upvotes: 3