Loading HTML to div/iFrame
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!!
yes you can define an iframe inside a div
<div><iframe name="myframe" src="about:blank"></iframe></div>
then change target to frame for the links to be clicked
a href="..." target="myframe">...</a>
then you can style/position your div as required.
hope it works, i did'nt try.
I have two questions though.
1. Will I have to define the iFrame dimensions? Can it be set to expand with the size of the HTML search document?
2. Since the links are 'called' to the div by way of search, the search display page is dynamic - the documents/html pages displayed changes based on search input.
So I think I cannot set a 'a href =link, target.. as I wouldnt know what pages would be pulled by the result.
May be I can explain the situation better below:
Page A - has DIV for result display and Search Box.
Folder /B: has all the articles saved as *.HTML pages
Enter search keyword, matching *.HTML pages from Folder B are displayed on the DIV as URLs.
This varies based on search keyword.
Now I am trying to click one of these URLs to open in the same DIV.
Using the method you mentioned, where should I place the a href = target..myframe> code?
Thanks for your help!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)