View Full Version : Filling a div with contents from another html page?

02-09-2005, 12:02 AM
Im pretty nooby at this, but I wondered, if its possible to fill the contents of a div with imported html from an other html file, kind of similar to the way in which frames used to work. I want to add a list of links to my page and all the subpages, but I want to be able to change the contents of this link div at a later lime, simply by editing the "links.html" or something like that - thus not having to copy paste the changed div content into all the pages seperatly.

I have seen in for instance pivot's php stuff that they use tags like [[link page]] on their templates, which results in the html of a file called something like aux_links.html ending up in a certain div on the final rendered php page, but I guess that requires hard-core scriptisch which I'm not capable of.

This is from the index page template from Pivot,

<div class="block">

which together with a file called _aux_link_list.html which is simply a bunch of links in a paragraph:
<p><a href="http://www.google.com/">a bunch of links</a></p>

results into this on the rendered page:

<div class="block">
<p><a href="http://www.google.com/" target='_blank'>a buch of links</a></p>

I love the way this works for Pivot, but now I want to use something similar on another page, which isn't a weblog, and for which I have not done any php or javascript or whatver - I wouldn't even know how to.

Is there an easy (html/css) way of accomplising stuff like this? Or perhaps a not so difficult way of scripting that I might be able to understand (I learn quick)? Or even maybe some standard script example already availiable somewhere I didn't find?

02-09-2005, 12:31 AM
Have a look here http://www.codingforums.com/showthread.php?t=50350&highlight=imitate+frameset+php


02-09-2005, 01:13 AM
Is it really that easy? Just making a php out of it and using the include fucntion? I'm going to try, I'll keep y'all updated. (Like anyone cares, haha)

02-09-2005, 01:19 AM
WTF, it worked, thanks a lot dude! Ain't learning stuff hell!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum