tags:

views:

31

answers:

2

I have two HTML source files. One called index.html and the other embed.html, but I want to embed the second file inside the index one, using HTML this is possible? If not, maybe using JavaScript or VBScript?

+2  A: 

You can use an IFrame.

In general, if both documents are valid documents, you cannot simply drop the content of one into another and expect the result to be valid HTML (for example, you will end up with two <body> tags (either nested or not), which is not valid HTML.

This is why frames exist, though they are not very user friendly.

Oded
Thanks very much! Also, they are nice because it is compatible with mobile browsers
Nathan Campos
A: 

In jQuery, I would use $.load()

Robert