Saturday, October 12, 2024

Clicking On Images In Forms

     I am getting a ton of mail from people who want active images on their site that do not produce an hand cursor when you go over it with the mouse. I looked around a bit and found how it was done. Here’s an example:





     The image above is active. If you click on it, you will be sent to the Goodies Home Page. Yet, when your mouse is on it, there’s nothing to indicate it is an active image. Here’s the code I used to make it:



    <FORM METHOD=”LINK” ACTION=”index.html”>

    <INPUT TYPE=”image” SRC=”htmlgdds.gif” “WIDTH=”101″ HEIGHT=”102″ BORDER=”0” ALT=”To Goodies”>

    </FORM>



Here’s What’s Happening


     The format is almost identical to the link button format. The difference is that you insert an image where you would configure the button.


  • FORM starts the process.
  • METHOD=”LINK” tells the computer this image will link with another page.
  • ACTION=”—“ is the URL of the link.
  • INPUT TYPE is an image.

     From there on out, it follows the format of an image using the SRC, HEIGHT, WIDTH, and ALT commands to define the size and alternative text. You can set the BORDER to any number you want, however “0” loses any blue border.

     And one of the nice side effects of this format is that there is no hand cursor when the mouse passes over.

     Well, that’s how it’s done, but I don’t quite understand why someone would want this. I thought the point was to make the links obvious. This does a pretty good job of hiding that the image is a link. Oh well… to each their own. I hope this helps.

Enjoy!

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Popular Articles

Featured