A revolving earth (earthani.gif--64x64) Beaverland Net
Net Art
 
Japanese Version (japanv.gif--100x36)

Beaverland Net Art logo (netart2.gif--140x365)

Beaverland Net HTML Made Easy! logo (html02.gif--140x160)

Beaverland Net JavaScript Made Easy! logo (javascrx.gif--140x233)

Beaverland Unlisted Slang logo (slangs2.gif--140x260)

Beaverland Womania logo (pinup35e.gif--140x565)

Beaverland Historica logo (histbanr.jpg--140x360)

Beaverland Mythology logo (mythbanr.jpg--140x255)

Beaverland Stries logo (stories.jpg--140x276)

Beaverland Webs & Internet Secrets logo (web100.jpg--140x250)

Beaverland Cleopatra Gallery logo (galleryt.gif--177x275)

Beaverland Ciold War Years logo (coldwrbn.jpg--140x320)


onstore.gif (140x93)

beavbook.gif (120x160)

beavcomp.gif (120x160)

beavmovi.gif (120x160)

beavgift.gif (120x160)

beavtrav.gif (120x160)

music.gif (50x50) Beaverland Music
 
Presentation of Butts
January 14, 2004
 

 

Can you match those famous posteriors with their rightful owners?

If you can, you must be an acute butt watcher. Although I like to watch charming behinds in the movies, I have absolutely no idea who own those shapely butts.

So, to help you solve the puzzle, I set up a self-teaching screen below. To see who owns each behind, simply click one of those posteriors.

AOL Women Fitness four butts 
page (4butts.jpg--422x220) Butt 1 Butt 2 Butt 3 Butt 4 Please click each butt!

June changes clothes (june376x.gif--182x378)

 

Here goes the code.

<img usemap="#butts" src="images/4butts.jpg"
  alt="AOL Women Fitness four butts page"
  width="422" height="220">

<map name="butts">

<area shape="rect" alt="Butt 1"
  coords="160,10,280,110"
  href="javascript:void
        (document.betty.src='images/church3.jpg')">

<area shape="rect" alt="Butt 2"
  coords="160,110,280,210"
  href="javascript:void
        (document.betty.src='images/lopez3.jpg')">

<area shape="rect" alt="Butt 3"
  coords="280,10,400,110"
  href="javascript:void
        (document.betty.src='images/theron3.jpg')">

<area shape="rect" alt="Butt 4"
  coords="280,110,400,210"
  href="javascript:void
        (document.betty.src='images/aguilera3.jpg')">

<area shape="rect" alt="Please click each butt!"
  coords="0,0,400,220"
  href="javascript:alert('Please click each butt,
        will ya!')">
</map>


<img name="betty" src="images/june376x.gif"
  alt="Betty changes clothes (june376x.gif--182x378)"
  width="246" height="442">

 

I assume that you know how to use the IMG tag. If not, please visit this page: How to Use an IMG Tag. (A new window will open up.)

As you see in the above code, you devide a single picture into five clickable or click-sensitive segments—not physically but programmatically.

You might wonder why five—not four—because the above picture shows only four butts. You will see why the above code set up five clickable segments if you click the white portion of the above picture.

If you want to know more about the USEMAP attribute, please visit this page: How to use <MAP> and <AREA> tags.

Once you set up those clickable segments, you then assign each picture or special instruction to the HREF attribute of each segment as shown in the above code.

When you want to use a Javascript code with the HREF attribute, you can write it in the following manner:

Click here!

<a href="javascript:alert('Thank you')">Click here!</a>

Click here!

<a href="javascript:void(0)">Click here!</a>

When you click the above link, you can see nothing happen. Your computer has, however, evaluated the contents of the parenthesis. Your machine has understood that it contains zero.

Click here! icon (click01.gif--96x96)

(To reset, please double-click the above!)

<a href="javascript:void
  (document.here.src='../images/drive.gif')">
<img name="here" border="0" src="../images/click01.gif"
  alt="Click here! icon (click01.gif--96x96)"
  width="96" height="96"></a>

By the same token, if you click the above link, you see a rumbling truck.
In this case, your machine evaluates the contents, understanding that it contains an instruction. Therefore, it executes the following statement:

document.here.src='../images/drive.gif'

This statement will replace the “Click here!” icon with the rumbling truck.
Make sure that you name the icon—in this case, here—using the NAME attribute with the IMG tag.

Why do you use VOID( )
in the first place?

Good question!
As shown in the above example, you don’t use VOID( ) when you executes the ALERT( ) function or method.

When you write in the following manner, something weird will happen.

<a href="javascript:
      document.here.src='../images/drive.gif'">

Please test it by yourself, clicking the link below:

Click here! icon (click01.gif--96x96)

(To get back here, please click the BACK button on your browser.)

As you see, your screen shows a string value (../images/drive.gif), instead of the rumbling truck.

To prevent this, you have to use the VOID method as shown previously, or you can add VOID(0) after the statement like this:

<a href="javascript:
    document.here.src='../images/drive.gif';void(0)">

Click here! icon (click01.gif--96x96)

I think this is a Javascript bug.
Remember that no software is perfect because nobody is perfect.

 

Related Links





Rate article:
Excellent Good Neutral Poor Worst

Your Name:
Your Email Address:
Comments:


  Comments
 
Tell me how to use a double-click.

    - Gregori Stansky


The full code of the above example is as follows:

<a href="javascript:void
  (document.here.src='../images/drive.gif')"
  onDblclick="document.here.src='../images/click01.gif'">
<img name="here" border="0" src="../images/click01.gif"
  alt="Click here! icon (click01.gif--96x96)"
  width="96" height="96"></a>

As you see in the above code, you have to use an event handler called onDblClick.

If you want to know more about event handlers, please visit this page: How to use an event handler.

    - Akira

 
 
Copyright Akira Kato
About this author:
  • Educated both in Canada and Japan
  • Traveled extensively in Europe, Far East, and North America
  • Worked as management consultant, computer systems analyst, college instructor and freelance writer.
Akira Kato


Wanna Thank Your Girlfriend,
Sister, or Mother
With a Touch of Difference?

A woman in a black leotard (208x355)   A woman in nice langerie (208x353)

She deserves the Best,
doesn’t she?
Find it out for yourself here!

A banner for surpriseyourwoman.com


Beaverland Forum
Featuring thought-provoking
columns and stories
inserted by FC2 system