Results 1 to 2 of 2

Thread: Changing Button Image When Clicked

  1. #1
    Join Date
    May 2012

    Changing Button Image When Clicked

    Okay, this is my first post on these forums so I hope this is the appropriate place to ask this question.

    I'm working on my final for my Web design class and I would like to have the buttons that I have made in Photoshop when clicked switch to the clicked versions I have made of them. Also when they are clicked they will be linking to another page. If anybody could post some example code for me or if you could give me a link to a page that clearly explains this I would really appreciate it.

    I'm sorry if I'm sounding rude asking for this but I have to have my final in within the next thirty six hours or so.

    Any help is greatly appreciated.


  2. #2
    Join Date
    Jun 2004
    Portsmouth UK
    if you click the image it will link directly so the image swap
    is wasted
    mouseover example

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <a href="URL1.htm" ><img src="http://www.vicsjavascripts.org.uk/StdImages/Egypt5.jpg" alt="egypt" border="0" 
    onmouseover="this.src='http://www.vicsjavascripts.org.uk/StdImages/Egypt6.jpg';this.parentNode.href='URL2.htm'; "
    onmouseout="this.src='http://www.vicsjavascripts.org.uk/StdImages/Egypt5.jpg';this.parentNode.href='URL1.htm'; "

    God loves you and will never love you less.

    If my post has been useful please donate to http://www.operationsmile.org.uk/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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