educational

Graphical Enter Links & Beyond

Having a graphical rather than text-based 'enter' link provides several benefits for free and AVS site owners. These diverse benefits include everything from much wider acceptance by premium AVS services who tend to prefer 'graphically enhanced' sites for inclusion on their link lists, to free site 'warning' pages that strive to divert surfers to a sponsor's site — and stand a much better chance of doing so if their sponsor's banners have a chance to load before the surfer sees that plain text 'enter' link; which is displayed well before any of the page's graphics (including your advertisements) load.

While it's a very simple matter to make a straightforward 'enter' graphic, and indeed, there are many online graphics resources that offer these standard icons as a free download for those who are seriously artistically challenged, today I want to show you an effective technique for making a graphical 'enter' button, complete with a cross-browser JavaScript to provide a 'rollover' effect.

This is one of my favorite techniques; after all, 'happy' buttons enhance a Web page's appearance, and also provide positive feedback to the user. While most JavaScript 'rollover' solutions are simply code-based, and therefore will not work on non-JavaScript enabled browsers, this method will work across all browsers, and is the epitome of 'graceful degradation.' Browsers incapable of rendering the JavaScript will simply display the basic graphic, and as an added bonus, the inclusion of 'alt' tags allows text readers and search engines to parse the link as well. Here's how it's done:

Building the Buttons
The concept behind this technique is really quite simple: we will create two nearly-identical images, altering only the text (foreground) color for this example. For this method to work properly, the images must be the same size, and precisely aligned. While you can accomplish this process with just about any 'paint' program, the following is the procedure with my Web graphics software of choice; Micrografx Picture Publisher 8:

1.) Create a new image by selecting File > New: or by clicking the 'new image' button. I chose to make this 'enter' link 250x50 pixels (a reasonable, and readable, size) and gave it a plain black background — although you could use the Texture tool to fill the blank image with your site's background pattern.

2.) I then used the Text tool to create the 'ENTER' text, selecting a bold, anti-aliased 60pt white Arial font for the primary image. This filled the graphic space completely, leaving a slight border top and bottom that may be cropped to further reduce the file size, but is an 'unnecessary' step for this example. To complete the image, click the 'GIF' button on the main toolbar. The 'GIF Options' dialog box will appear. It is really unnecessary for this to be a transparent image, so I left the default settings intact, ensuring that 'Interlaced GIF' was selected, and then saved this image as 'enter_a.gif'

Any number of other colors or effects such as gradients, glows, or textures could have easily been used, but I wished to keep this simple.

3.) Next, I chose 'Yellow' (255,255,0) from the 'Color Palette' dialog box, and use the 216-color 'MS Internet Explorer' palette to ensure a web-safe color selection. I then used the 'paint bucket' Fill tool to change the text color to the chosen shade of yellow. Any number of other colors or effects such as gradients, glows, or textures could have easily been used, but I wished to keep this all very simple. A repeat of saving the image by hitting the 'GIF' button, with the only change being the file name ('enter_b.gif') completed the building of our buttons.

Adding the Script
Once the graphics are prepared, the magic begins! After building the Web page and uploading the graphics, the script then needs to be added. For a 'before and after' look, check out the HTML:

HTML HEAD TITLE Graphical Enter Link /TITLE /HEAD>
BODY bgcolor="000000" CENTER>

A href="http://xbiz.com/articles/webmastering/0402/29.html" IMG border="0" src="http://xbiz.com/articles/images/pp8-1/enter_a.gif" alt="ENTER" width="250" height="50" /A>

/CENTER /BODY /HTML>

This basic page code is modified to include the 'rollover' image swap plus a status bar mask. You can see the effect in action by clicking here:

HTML HEAD TITLE Graphical Enter Link /TITLE>

SCRIPT LANGUAGE="JavaScript">

!-- ROLLOVER

var NN3 = false;
image1= new Image();
image1.src = "http://xbiz.com/articles/images/pp8-1/enter_a.gif";
image1on = new Image();
image1on.src = "http://xbiz.com/articles/images/pp8-1/enter_b.gif";

function on3(name) {
document[name].src = eval(name + "on.src");
}
function off3(name) {
document[name].src = eval(name + ".src");
}
NN3 = true;

function on(name) {
if (NN3) on3(name);
}
function off(name) {
if (NN3) off3(name);
}

function a(txt) {
self.status = txt
}
function b() {
self.status = ""
}

// ROLLOVER -->

/SCRIPT /HEAD>

BODY bgcolor="000000" CENTER>

A href="http://xbiz.com/articles/mainstream/0402/29.html" onmouseover="on('image1'); a('ENTER');return true;" onmouseout="off('image1'); b();" IMG src="http://xbiz.com/articles/images/pp8-1/enter_a.gif" alt="ENTER" width="250" height="50" border="0" name="image1" /A>

/CENTER /BODY /HTML>

This is a really simple use of a very powerful script. Additional images can be added to use this script for generating site-wide navigational bars and for other times when a good cross-browser, gracefully degradeable image changing script is needed. Have fun, and good luck! ~ Stephen

Copyright © 2024 Adnet Media. All Rights Reserved. XBIZ is a trademark of Adnet Media.
Reproduction in whole or in part in any form or medium without express written permission is prohibited.

More Articles

opinion

To Cloud or Not to Cloud, That Is the Question

Let’s be honest. It just sounds way cooler to say your business is “in the cloud,” right? Buzzwords make everything sound chic and relevant. In fact, someone uninformed might even assume that any hosting that is not in the cloud is inferior. So what’s the truth?

Brad Mitchell ·
opinion

Upcoming Visa Price Changes to Registration, Transaction Fees

Visa is updating its fee structure. Effective April 1, both the card brand’s initial nonrefundable application fee and annual renewal fee will increase from $500 to $950. Visa is also introducing a fee of 10 cents for each transaction, and 10 basis points — 0.1% — on the payment volume of certain merchant accounts.

Jonathan Corona ·
opinion

Unpacking the New Digital Services Act

Do you hear the word “regulation” and get nervous? When it comes to the EU’s Digital Services Act (DSA), you shouldn’t worry. If you’re complying with the most up-to-date card brand regulations, you can breathe a sigh of relief.

Cathy Beardsley ·
opinion

The Perils of Relying on ChatGPT for Legal Advice

It surprised me how many people admitted that they had used ChatGPT or similar services either to draft legal documents or to provide legal advice. “Surprised” is probably an understatement of my reaction to learning about this, as “horrified” more accurately describes my emotional response.

Corey D. Silverstein ·
profile

WIA Profile: Holly Randall

If you’re one of the many regular listeners to Holly Randall’s celebrated podcast, you are already familiar with her charming intro spiel: “Hi, I’m Holly Randall and welcome to my podcast, ‘Holly Randall Unfiltered.’ This is the show about sex, the adult industry and the people in it.

Women In Adult ·
trends

What's Hot Now: Leading Content Players on Trending Genres, Monetization Strategies

The juggernaut creator economy hurtles along, fueled by ever-ascendant demand for personality-based authenticity and intimacy — yet any reports of the demise of the traditional paysite are greatly exaggerated.

Alejandro Freixes ·
opinion

An Ethical Approach to Global Tech Staffing

One thing my 24-year career as a technologist working to support the online adult entertainment industry has taught me about is the power of global staffing. Without a doubt, I have achieved significantly more business success as a direct result of hiring abroad.

Brad Mitchell ·
opinion

Finding the Right Payment Partner

Whenever I am talking with businesses that are just getting started, one particular question comes up a lot: “How do I get a merchant account?” It’s a simple question, but it has a complicated answer.

Jonathan Corona ·
opinion

The Taxman Cometh for Every Business

February may be the month of romance, but it is also a time when we need to think about something that inspires very little love: taxes. April is not far away, and the taxman is always waiting. This year, federal and most state income taxes are due Monday, April 15.

Cathy Beardsley ·
opinion

The Continuous Journey of Legal Compliance in Adult

The adult entertainment industry is teeming with opportunity but is also fraught with challenges, from anticipating consumer behavior to keeping up with technological innovation. The most labyrinthine of all challenges, however, is the world of legal compliance.

Corey D. Silverstein ·
Show More