Click to See Complete Forum and Search --> : Can you import the contents of a html document into a layer?


leonard_770
02-12-2003, 11:51 AM
If I have html pages that just contain different blocks of text, is it the possible to call these into a layer when a link is rolled over?

I know this can be done using iFrames but I want to know if it can be done using layers, (DIV tags).

Each html file contains about 500 words of text with css style tags.

Thanks for your help.

pyro
02-12-2003, 11:59 AM
With PHP or SSI, you can.

.php
<?PHP
include("yourfile.htm");
?>

.shtml
<!--#include file="yourfile.htm"-->

leonard_770
02-13-2003, 03:50 AM
Pyro, how would you add this to a href, and target the DIV layer etc.?

Thanks,

Lenny

pyro
02-13-2003, 07:26 AM
If I understand you correctly, something like this might work...

<div id="mydiv">

<?PHP
include("".$QUERY_STRING."");
?>

</div>

and then your links would look like this

<a href="thiscurrentpage.php?yourincludedpage.htm">Click here to show yourincludedpage.htm</a>

leonard_770
02-14-2003, 05:27 AM
Hi Pyro, I tried this but I can't get it to work.

Would it be possible for you to upload or zip an example of what you've written?

Also do the files have to be uploaded to work or do they function on the computer?

Thanks, (and please excuse my programming ignorance).

Lenny

pyro
02-14-2003, 06:52 AM
Originally posted by leonard_770
Also do the files have to be uploaded to work or do they function on the computer?Yes, unless you have a server with PHP support installed on your computer.

Originally posted by leonard_770
Would it be possible for you to upload or zip an example of what you've written?I will try to do that soon.

pyro
02-14-2003, 07:13 AM
Here is a link to a working version. http://www.infinitypages.com/leonard_770/

Also, all files needed are attached below.

leonard_770
02-17-2003, 05:40 AM
Thanks very much for all your help Pyro. I'm going to try out these files now and I think everything will work ok.

Lenny.

leonard_770
02-19-2003, 05:07 AM
Hi Pyro, srry to bother you again,

But I don't think that my server supports php as nothing appears
in the box when I click the links it's just blank.
(But when I change the border sixe in the index.php to 5 this appears,
so I'm confused as to what is happening).

Could you guide in what I'd need to do if I used the .shtml method that
you mentioned earlier.

Thanks for all your help,

Lenny.