SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Guru
    Join Date
    Nov 2000
    Posts
    740
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Button acting as a link

    I have a Button on a page that when it is clicked, it should send someone to my homepage.

    What would the javascript/html be for a simple thing like this?

    Thanks,

    Jon

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,684
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    Code HTML4Strict:
    <a href="http://myhomepage.com/">
        <img src="button.jpg" width="100" height="30" alt="name of my homepage">
    </a>

  3. #3
    SitePoint Guru
    Join Date
    Nov 2000
    Posts
    740
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The code I have is:

    Code:
    <input type="submit" name="Submit" value="Click Here To Return To The Home Page">
    So are you saying that I have to convert the button into an image? Or can I just apply some javascript to the button?

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,684
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by Jon Lawrance View Post
    So are you saying that I have to convert the button into an image? Or can I just apply some javascript to the button?
    If you want an actual input button you could also use something like the following, and use no name if you don't want to submit anything.

    Code HTML4Strict:
    <form action="http://myhomepage.com/">
    <input type="submit" value="Click Here To Return To The Home Page">
    </form>

  5. #5
    SitePoint Guru
    Join Date
    Nov 2000
    Posts
    740
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't worry, created an image now. Thank you.


Bookmarks

Posting Permissions

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