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

October 15, 1999

How To Thwart Scene Stealers; Changing Cursors; Parsing SHTML Files

By David Fiedler and Scott Clark

Dear Dr. Website®: How can I disable the right-click button on a user's mouse to prevent him from "borrowing" images from my site? Also, how can I change the appearance of my cursor?

There is a great explanation of how to do that here: http://javascript.internet.com/page-details/no-right-click.html. It is not absolute protection; Mac users can still grab an image, and anyone can still view the source and grab the image in their browser.

As for changing the cursor, you can use style sheets to do it (for MSIE, anyway; we don't think it can be done for Netscape without using plug-ins). The following example would create a crosshair cursor for any images on the page:

<style type=text/css>
<!--
img {cursor: crosshair}
-->
</style>
or you could use these cursors:
cursor: default
cursor: n-resize
cursor: s-resize
cursor: e-resize
cursor: w-resize
cursor: ne-resize
cursor: se-resize
cursor: nw-resize
cursor: sw-resize
cursor: auto
cursor: hand
cursor: text
cursor: wait
cursor: help
If you want to get really fancy with cursor changes, check out CometZone.

Dear Dr. Website®: I run a Web site in my spare time and just redesigned the main page. I used SSI polls, so I had to change the extension to .shtml. Many links on subsequent pages point to the original .html page. What can I do to make the old .html page automatically redirect to the new .shtml page?

It's not always true that SSI pages must end with the .shtml extension, but don't feel too bad. We see plenty of online manuals from ISPs and Web hosting providers that incorrectly tell you this, even on systems where you can do the following: Assuming you're on a Unix system, try this first, since it often works. Instead of changing the extension to .shtml, just chmod it to make that individual file executable:

chmod 755 filename.html
You can do this via the shell or from a good FTP program. If that doesn't work, you can edit the .htaccess file (or create one if it doesn't exist) in the main HTML directory to add the following line:
AddType text/x-server-parsed-html .html
The good news is that this almost always works; the bad news is that now every file ending with .html will be checked for SSI tags when it's served, which slows down your server somewhat. However, if you start using SSI everywhere (for instance, many banner ad packages use SSI), this will make things much nicer than renaming all your files to .shtml.

Finally, if you have to leave things as is, then you can add the following code to your .html pages to point them to the correct .shtml page:

<SCRIPT LANGUAGE="JavaScript">
<!--//
window.location = "correctpage.shtml";
//-->
</SCRIPT>

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


internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs