Posted by Gremlin [12.253.238.245 - 12-253-238-245.client.attbi.com] on 21 August 2002 at 19.45.03 ZuluTime:
In Reply to: Template programs posted by Jurassosaurus on 20 August 2002 at 18.03.48 ZuluTime:
It's sort of a template, but I wrote it.
It's a .js file. Everything in the sidebars is in its own file, written in JavaScript, and pulled in from gremlin.net/js.
It works to some degree. Although I'm thinking of making a couple of changes to it too. The way it's written now, it uses relative URLs, which allows it to work here on my computer, offline. The problem with that is that I have to use different .js files for different things: files in the cgi-data folder are called from the server by counting up through the directories [../../whatever], which is going to get messy if I add more infrafolders to the site. I'll probably switch it to http://gremlin.net/whatever pretty soon, and use one .js file for everything.
If you look at the sourcecode, you should be able to see the inclusion tag. In this case:
[SCRIPT LANGUAGE="JavaScript" SRC="../../js/sub2/sub2open.js"]
[/SCRIPT]
Which pulls in http://gremlin.net/js/sub2/sub2open.js. That's the left sidebar. The right sidebar is sub2close.
The advantage is that I can change things in the sidebars by editing one file [or, actually, three or four of them], and the changes will affect all the files relying on the JavaScript already in existence.
So it's sort of a template, I guess. It's just not something you're going to find in a WYSIWYG travesty.
--Gremlin