mrlegs Posted January 28, 2008 Posted January 28, 2008 This is probably a really basic thing to do, but is beyond me at the moment! I am putting together a standardised Home Page for the school, Firefox stylee, and want to have text on there taken from a .txt file which will also be kept on the server, but accessible by the Head/secretary etc for dates, messages etc. The trouble I'm having is I don't know how to get the .html code to go to a text file and read it. Any suggestions/ideas?
localzuk Posted January 28, 2008 Posted January 28, 2008 You can't do it directly with html, but you can with some form of language - either client or server side. Personally I would say the easiest way would be to use shtml. http://httpd.apache.org/docs/1.3/howto/ssi.html Or you could use php, and the include tag: http://uk.php.net/include/ Or in javascript like this: http://www.netmechanic.com/news/vol4/javascript_no9.htm Or, if you're feeling evil, you could use an iframe to do it: http://www.w3schools.com/tags/tag_iframe.asp 1
Joedetic Posted January 28, 2008 Posted January 28, 2008 (edited) To extend on what localzuk has said. If you're using Apache as your webserver then a nice PHP include is what I'd use. If you're using IIS and don't want to switch to Apache or install PHP for IIS then you could use the SSI method that localzuk has linked to within IIS. A bit of googling will tell you how to enable shtml and SSIs within IIS. Edited January 29, 2008 by Joedetic
fooby Posted January 29, 2008 Posted January 29, 2008 Maybe its overkill but have you looked at the EduGeek Joomla! package? this is a full featured site in one package ready to deploy on a web server. search here for it, its pretty smart.
mrlegs Posted January 29, 2008 Author Posted January 29, 2008 It certainly seems like the direction the school is heading, and I know Joomla is quite effective as an intranet device. Thanks for all the ideas folks. I will attempt them in order!
Domino Posted January 29, 2008 Posted January 29, 2008 I'd also suggest sharepoint we use it for our intranet and its been great!
limbo Posted January 29, 2008 Posted January 29, 2008 Surely you can just just the include option that should work in basic html??
webman Posted January 29, 2008 Posted January 29, 2008 Surely you can just just the include option that should work in basic html?? That only works with server-side SHTML.
Friez Posted January 29, 2008 Posted January 29, 2008 (edited) If you have PHP: <?php readfile("somedoc.txt"); ?> If you want to do this in STRAIGHT HTML (no serverside stuff needed) you could use regular frames: or for the uber hack: rename the .txt to .htm!! or, you MIGHT just be asking for a simple thing like how to link to other documents rather than show the document on a .htm, to do this you just use a hyperlink like so: Some Description Here Edited January 29, 2008 by Friez
localzuk Posted January 29, 2008 Posted January 29, 2008 Just a quick note though - frames are not very accessible to those with poor eye-sight etc...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now