PDA

View Full Version : Is there a way for me to link to an external HTML File Like I can do w/ css?


l3vi
03-21-2003, 12:38 AM
I want to insert text from an external HTML File, without using an IFRAME, kind of like I do with css. (<link rel=stylesheet...) Is there a way for me to do this but with HTML? Thanks a bunch!:thumbsup:

meow
03-21-2003, 12:52 AM
Uhm? You could use an iframe or better use SSI (Server Side Inludes). Your server must support SSI in you may or may not have to rename your files .shtml

http://www.bignosebird.com/sdocs/include.shtml

PHP can also do this.

l3vi
03-21-2003, 12:57 AM
Umm... I knew PHP could do this already. If I cant do it thats okay. But I thought you could do it with like using a <link rel or whatever tag. I guess not.

meow
03-21-2003, 01:12 AM
If you can only use HTML go for IFRAME.

LINK doesn't include anything really, not in that way.

Catman
03-21-2003, 04:59 AM
Or you can use <object data="filename.html"></object> -- however, dynamically changing the embedded file is a bit tricky.

[m]
03-21-2003, 06:00 AM
you can use javascript but can take alot longer then useing PHP.

in the main file you would have:

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="file.txt">
</script>



and in file.txt

document.write("whatever you wanted to write")


that sould work




and if u want to hide your code just change the file name to file.php , It should work

Eskimo
03-21-2003, 08:31 PM
What is the end result you are looking for?

Are you wanting add news/blog like functionality to your site, or is this something completely different?

Grant Palin
03-21-2003, 11:48 PM
Originally posted by meow
Uhm? You could use an iframe or better use SSI (Server Side Inludes). Your server must support SSI in you may or may not have to rename your files .shtml

http://www.bignosebird.com/sdocs/include.shtml

PHP can also do this.

I tried implementing SSI on my website, and the performance was lousy (slow). Would using PHP be any better?

meow
03-22-2003, 12:52 AM
Then there must be something wrong with the server. You shouldn't notice a difference. :confused:

[m]
04-30-2003, 04:54 PM
oh what I ment was it might take longer to write out not for the server/you to process it :)