PDA

View Full Version : I need help with a JavaScript...Changing all pages using one..


snfalcao
05-27-2002, 04:37 PM
I´d like to make a request
If anyone is able to help me, I really won't be sure how to them. I´ve been looking for a JavaScript like this for a LONG time, and I even saw it somewhere a little while ago, but i didn't need it then, and now I can´t seem to find it anywhere.
Ever seen those sites totally made with tables and such(most are like that nowadays)? Well, usually, they are made with languages(are those languages) like "asp", cfm, etc, and I'm not familiar with any of them.
That said, you must imagine how it must be hell to change the SAME DAMN THING, in, like, 95 HTML pages (in order to update the site). I've seen a script that you can edit it all really quick, like when you edit one, all are changed.
Anyone that knows ANYTHING about that Javascript, or is willing to teach me something about those other languages(I guess not), please contact me.
Like, updating ONE THING in the menu is HELL, because, its 95 html pages, so i have to do it one by one...

Thanks for your attention,
Stéfano Norte Falcão

scoutt
05-27-2002, 06:01 PM
sounds like you want SSI (serverside includes). that way you can include one page throughout your whole site and just be able to update this one page.

http://www.snippetlibrary.com/tutorials.php?kid=34&catname=SSI

if you want to learn asp, cgi or php it usually takes a while to get it down and then you can put everything in a database.

snfalcao
05-30-2002, 07:15 AM
Hey, I read all those things you sent me, and it seems pretty nice, and it will definately help a lot.
But I have some question... does my file NEED to be SHTML for the SSI to work? and what else do I need in order to make it work(Ive tried sometimes and it didnt work)? also, how do i do it? al i have to do is put the comment tag in the middle of the html, where I want? Make sure to give me some tips, please! If this works, its going to be REALLY helpfull.

scoutt
05-30-2002, 08:40 AM
ys your file NEED to be shtml. that way the server will know to parse the file as SSI. the only other thing you need is to make sure the server supports it. try this as it will tell if you have SSI enabled or not. just insert teh script below and save it as test.shtml and run it on your server or website. if it prints out ok then you are all set. and yes you put the comment tags right where you want the file to appear. you can even set them in tables. not really any tips, just something you have to learn on your own. really it is this easy. if you have problems, just pop back in here and we can help you out.


<html>
<head></head>
<body>
<!--#echo var="DATE_LOCAL" --><br>
<!--#config timefmt="%D" --><br>
This file last modified <!--#echo var="LAST_MODIFIED" -->
<p>
testing page

</body>
</html>

snfalcao
05-30-2002, 09:36 AM
Thanks a lot. I did as you told me, and all worked fine. This will be really usefull, thanks!

Ian
05-30-2002, 11:48 AM
Originally posted by scoutt
ys your file NEED to be shtml. err, scoutt?? A1 has includes all over the place and none of those pages are shtml. I think it only depends on the type of incude and how you're adding it. Also server config has much to do with it I guess. Maybe "May Need" might be better :)

scoutt
05-30-2002, 11:55 AM
that is true Ian, the server has alot to do with it. should have used "May Need".. :)

most standard generic setups you need the shtml, but if the server is setup to parse html as shtml then you don't need to worry about it. but the latter is not recommended as it would load it down and if there was other users on it it might mess then up them as well.

snfalcao
05-30-2002, 03:47 PM
Gotcha!
Just before I stop bothering you, I'd like to ask something else about SSI.
Can it be used if I see it offline? or do i *HAVE* to upload i to my server first?

scoutt
05-30-2002, 06:58 PM
you will need a server to view them.