February 9, 1998
DR. WEBSITE:
How To Customize Global Website Settings From a Single Script File
By David Fiedler and Scott Clark
Dear Dr. Website: Is there a way to set a variable on the home page for use by pages that follow, or must all that be done on the server/scripting side?
For example, I want to set "color = nowcolor". I set nowcolor once a day for certain table backgrounds on the home page, and now I want other tables to use the same thing. I don't want to go to all my existing pages and hard-code the color attribute. Any simple suggestions?
Well, you could use Cascading Style Sheets (CSS), or, as you intimated, Server-Side Includes (SSI). But how about this simple, if not elegant idea--I did not use the word "kludge"--which will let you set the color for your table's backgrounds in one place and use it throughout the site. Use a linked JavaScript file (named "tablebg.js"), whose sole contents are something like this:
document.write('<TABLE
bgcolor=\"yellow\">');
This way, you can change the color simply by changing it within this JavaScript file. Then, everywhere you have a table, you simply call the JavaScript file:
<SCRIPT LANGUAGE="JavaScript" SRC="/old?u=http%3A%2F%2Fwebdeveloper.com%2Fdrweb%2Ftablebg.js&y=1999">
</SCRIPT>
<TR><TD>
Ya-mon, no problem!
</TD></TR>
The JavaScript writes the top part of the table, and the rest is done normally. Of course, you could narrow it down to simply writing the BGCOLOR, instead of the entire top of the table.
Dear Dr. Website: I am using FrontPage 98 to design my Web page, and most of the Internet service providers I'm dealing with don't yet support the FrontPage extensions. I don't want to use another Web editor. Is there any way to export the Web pages I created with FrontPage 98 so I can use them on my ISP?
This is an excellent question, and I must partly lay the blame for your confusion on Microsoft. By making FrontPage so dependent on these proprietary extensions, they've created an awkward situation for developers and ISPs alike.
If an ISP feels the extensions could cause a security or performance problem, that ISP is within its rights not to install them--yet it then runs the risk of losing business to a competing ISP that does install them.
For this reason, some ISPs charge extra for use of the FrontPage extensions, even though they're available for free from Microsoft. And, of course, it's the familiar story of tempting you with proprietary code: Once you start using it, you don't want to give it up, so you feel tied to Microsoft products forever.
Fortunately, there is a certain amount of good news for you. You don't actually need the FrontPage extensions on your ISP's remote server to use FrontPage to design your site, or even to publish your site to the server.
When you hit the Publish button in FrontPage, it attempts to connect directly to your server through the extensions, but if it doesn't find them there, it automatically launches the Microsoft Web Publishing Wizard instead, which transfers the file via ordinary FTP. I know this works because I tried it myself, though it may take one or two tries the first time around.
Ordinary Web pages designed using FrontPage 98 will work fine on any ordinary Web server, even without the extensions. You can even use the Active Elements, since they're Java-based.
However, you won't be able to use any of the FrontPage Components--such as search, e-mail, or discussion forums--in your site, nor will you be able to administer your site directly as if it were a FrontPage web located on your machine.
In order to design with FrontPage to its fullest potential, you'll have to install Microsoft's free Personal Web Server on your own machine, though, and install the FrontPage extensions on it.
If this task proves too daunting, don't worry; you can use the FrontPage editor separately (it's called fpeditor.exe, and it's in the \bin directory wherever you installed FrontPage), without the FrontPage Explorer.