Log in

View Full Version : Loading HTML to div/iFrame



codernoob
09-24-2012, 12:16 PM
Hi,

I am designing a website for my small office, to be used by 10 people at the most - using Intranet.

I have a DIV in a page which shows the internal articles search results. The Articles (help documents) are saved as html files in a sub folder and so show up as links in the search results.

-> Hit search by inputting keyword.
-> Search results displayed (multiple links) on the div named results.

Currently the html page (search result) open in a new window when you click any of the result links.

I am trying to get these links to open in the same DIV instead of a new window.

Is this possible? If one cant load html content in DIV, is there some way to do it by using iFrames? (can I define an iFrame inside a div?

Thanks for your help!!

djr33
09-24-2012, 01:17 PM
In some sense, no. But you can get around this using Ajax (a method of Javascript). Just google that as a place to start.
Alternatively, yes, an iframe would be much simpler. Just set it up with the same dimensions (and perhaps other properties) as required, and it should work immediately.