• 0

innerHTML from another page


Question

5 answers to this question

Recommended Posts

  • 0

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

  • 0

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>"

  • 0

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.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.