Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Oct 2005
    Posts
    140
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Make Image Clickable

    Hi all,

    How do i make an image clickable ,like a button?
    I have this code:

    <img src="abc.gif" onClick=" ... "> how do i use the onClick event? Say i have a button labelled alphabet 'a' and when i click on it,i want the 'a' to appear in the textbox.

    my main concern is how to i get the image to be clickable?

    thanks .. !

  • #2
    Regular Coder
    Join Date
    Nov 2003
    Location
    Vancouver Island Canada
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <a href = "#" onclick = "doStuff()"><img src = "yourImage.jpg"></a>
    or 
    <img src = "yourImage.jpg" style = "cursor:hand;" onclick = "doStuff()">


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •