tiger2k Posted July 31, 2004 Share Posted July 31, 2004 is it possible to get set the innerHTML of an object from a different page. so insted of object.innerHTML = 'some code' it will be like this object.innerHTML = link to page with HTML Link to comment https://www.neowin.net/forum/topic/197089-innerhtml-from-another-page/ Share on other sites More sharing options...
0 JaytheletterJ Posted July 31, 2004 Share Posted July 31, 2004 how bout a little background on what ur tryin to do....i know of a few things you can do, but with innerHTML specifically im not sure that is possible....you can use an iframe or a layer loaded from a source file, but im not sure if that is what you are asking about Link to comment https://www.neowin.net/forum/topic/197089-innerhtml-from-another-page/#findComment-584270374 Share on other sites More sharing options...
0 Jambooo Posted July 31, 2004 Share Posted July 31, 2004 Yea, I think it can be done but I can't remember how. I think it's summint like object.innerHTML.src=http://somepage.html Link to comment https://www.neowin.net/forum/topic/197089-innerhtml-from-another-page/#findComment-584271856 Share on other sites More sharing options...
0 figgy Posted July 31, 2004 Share Posted July 31, 2004 If I understand corrently. You just want to display another page inside a page. You can easily do that by writing out an iframe object.innerHTML = "<iframe src='http://samedomain/page2.html' width='10' height='10' frameborder='0' border='0'><iframe>" Link to comment https://www.neowin.net/forum/topic/197089-innerhtml-from-another-page/#findComment-584271992 Share on other sites More sharing options...
0 Jambooo Posted July 31, 2004 Share Posted July 31, 2004 Found something similar to what you're looking for here: http://javascript.internet.com/page-details/load-html.html Link to comment https://www.neowin.net/forum/topic/197089-innerhtml-from-another-page/#findComment-584272282 Share on other sites More sharing options...
0 monkeydust Posted July 31, 2004 Share Posted July 31, 2004 Yeah, the IFrame idea is one way to do it. Another way that I do it is create a page in XHTML, create a XML DOM object and do a xdomDocument.load("page.htmlnd then you can do a oElement.innerHTML = xdomDocument.xml. Note: this is IE specific and you have to have the MSXML XML parser installed on the client computer. This is fine if you are working on an application where you have control of the client computer setup. Also with this method, you can manipulate the pages elements faster than you can when using the IE DOM. I have one of my pages in a medical web-based application that I created that has around 10,000 lines of code/xhtml and I went this route because I had to do whatever possible to increase performance. So, your method that you choose really depends on your application and your client's setup. Link to comment https://www.neowin.net/forum/topic/197089-innerhtml-from-another-page/#findComment-584273114 Share on other sites More sharing options...
Question
tiger2k
is it possible to get set the innerHTML of an object from a different page.
so insted of
object.innerHTML = 'some code'
it will be like this
object.innerHTML = link to page with HTML
Link to comment
https://www.neowin.net/forum/topic/197089-innerhtml-from-another-page/Share on other sites
5 answers to this question
Recommended Posts