I have a webpart which I want to fill with the HTML of a SitePage.aspx. If the user fills the SitePage with a Title, 3 blocks of text and an image, I wish to be able to use that exact same content and plug it into my webpart.
What I'm looking for is something like
var content = document.getElementById('ID').innerHTML
And place this content in my web part. The only difference is, of course, the SitePage.aspx file and my web part are not on the same page and so I can not hope to search for any HTML inside this document.
Is there any workaround for this? It doesn't have to be a string of the HTML-content. If I can just plug the entire page in there, that's fine as well.
Lastly, if it's at all possible to make this work with the SitePage.aspx on a different (sub)site than the web part (sub)site, that would be ideal. If not, I'll figure out a workaround.
Thanks in advance.