internet.com

Go to WebDeveloper Home


hm-v6-139x61.gif

Database Journal: The Knowledge Center for Database Professionals

find a web host with:
CGI Access
DB Support
NT Servers
UNIX Servers
Telnet Access

advanced search
jobs

Get FREE Development Info via your Email!

The Webdeveloper channel
FlashKit
GIF.com
HiermenusCentral
webdeveloper Jobs
Java Boutique
JavaScript.com
JavaScript Source
ScriptSearch
StreamingMedia World
WDJ
WDVL
WebDeveloper.com
WebReference.com
XMLFiles.com

internet.com
Internet News
Internet Investing
Internet Technology
Windows Internet Tech.
Linux/Open Source
Web Developer
ECommerce/Marketing
ISP Resources
ASP Resources
Wireless Internet
Downloads
Internet Resources
Internet Lists
International
EarthWeb
Career Resources

Search internet.com
Advertise
Corporate Info
Newsletters
E-mail Offers

internet.commerce
Be a Commerce Partner










D R .   W E B S I T E®
WebDeveloper.com

November 16, 1998

CGI Revisited; Perl Before HTML; No-Line Links; Static Backgrounds; Minimal Mouseovers

By David Fiedler and Scott Clark
Dear Dr. Website®: In your column, CGI was described as a programming language. I thought it was a directory to put programs in. Could you talk about what CGI is? And what are shells?

Well, CGI is a directory...to put CGI programs in. The directory is usually named "cgi-bin," and developers place their CGI scripts within that directory so that the server can execute a script when a Web page calls it. There is actually no language called "CGI"--as we wrote in the column you're referring to [Sept. 28], CGI scripts can be written in different programming languages, such as Perl or C++. CGI simply stands for Common Gateway Interface.

Shells are found on most beaches. Sorry, couldn't stop ourselves. Actually, shells are kind of like "flavors" or specific user interfaces, for a Unix system, such as Korn, Bourne and C shell (yes, it's actually called the C shell). These shells enable users to create "scripts" using the shell's language, or simply issue commands to the Unix machine. Some people use the word “shell” to refer to any command-line interface with a scripting language, on any operating system, even Windows (via batch files).

Dear Dr. Website®: I want to be able to execute a Perl program before displaying any HTML pages--that is, I want to be able to call a script that will process some data, then send an HTML page when the user types "www.thissite.com", without using JavaScript or the refresh command.

You can indeed call a script in a URL:

http://www.thissite.com/cgi-bin/tricky.pl

for example. For this to work properly, the server's MIME type has to be set up to execute a Perl program, rather than displaying its source, and your cgi-bin directory also has to be set up properly. Usually the site's sysop does these things.

Dear Dr. Website®: Can I make a text hyperlink display without an underline?

Yes--but with a caveat. You can do it, but to view it properly, your site's visitors will need a fourth-generation browser that understands Cascading Style Sheets (CSS). Luckily, you don't need an entire separate complicated style sheet to get it to work:

<html>
<head>
<style type="text/css">
<!--
.unnamed1 { text-decoration: none; font-style: normal}
-->
</style>
</head>
<body bgcolor="#FFFFFF">
<p>
this is a <a href="http://webdeveloper.com" class="unnamed1">URL</a>
</p>
</body>
</html>

Dear Dr. Website®: How can I use JavaScript to keep users from saving or right-clicking on files (such as copyrighted images), to prevent theft?

Wow, wouldn't that be nice! Long answer: It can't be done--at least not until the full object model of a browser becomes exposed, letting you control the browser via a program--but at that point, anyone with a browser could still do it. Basically, if you can see it, you can download it, because your browser has already downloaded it into the cache on your machine.

The only real possibility we see here is if someone comes up with streaming graphics files, so that they are viewed, not downloaded, as happens now with RealAudio and RealVideo.

Dear Dr. Website®: I have seen one or two sites with backgrounds that stay in the middle of the screen regardless of any scrolling through the page. How is this done?

This also blew our minds the first time we saw it, and it's very simple. You add an extra property to the BODY tag, like this:

<body background="images/bkgegypt.gif" bgproperties="fixed">


A Note From the Authors: In response to our Oct. 19 column, a number of readers pointed out--with varying levels of politeness--that we had added unnecessary JavaScript and image pre-loading to our mouseover code. Chalk it up to an overdose of caffeine. As penance, we herewith humbly present the Absolute Minimal Mouseover:

<a href="nextpage.html" onmouseover="image.src='special.gif';" onmouseout="image.src='normal.gif';">
<img name="image" src="normal.gif" alt="nextpage.html">
</a>


Visit The Dr. Website® Archives.
Click here for a list of Dr. Website's most frequently asked questions (and answers!).
Send your own question to Dr. Website®.

Fast Jump to Anywhere on WebDeveloper.com®:


Contact the WebDeveloper.com® staff

Last modified: 20

 

Refresh Daily
Join Editor-in-Chief David Fiedler The Editor With No Time and find truth, justice, and a clue or two.


Browse by Category
[ Site Map ]

ActiveX / VBscript
Animated GIF Archive
Browsers
CGI / Perl
Database Connectivity
E-Commerce
HTML-Advanced: DHTML, CSS
HTML / Site Authoring Tools
Intranet/Groupware
Java
JavaScript
Multimedia: Audio / Video / Streaming Technologies
Opinions
Refresh Daily: Editorial Column
Security
Servers & Server Tools
Site Design / Graphics
Site Management / Marketing / Log File Analysis
VRML / 3D
XML




JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers