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 7 of 7
  1. #1
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts

    Problem with simple link

    I am trying to link an image to an outside website. And I cannot get it to work. Here is the coding I used exactly.

    Code:
    <a href=\"realmofdragons.shirtcity.com\"><img src=\"images/store1.jpg\" border=\"0\" alt=\"Tshirt City\"/></a>
    And the output is http://www.rodgame.org/realmofdragons.shirtcity.com
    It needs to link to http://realmofdragons.shirtcity.com

    If I do a double backslash it refreshes the current page.

  • #2
    Regular Coder
    Join Date
    Jul 2007
    Location
    UK
    Posts
    223
    Thanks
    0
    Thanked 14 Times in 14 Posts
    You need to add http:// to the beginning of the url, i.e.

    Code:
    <a href=\"http://realmofdragons.shirtcity.com\"><img src=\"images/store1.jpg\" border=\"0\" alt=\"Tshirt City\"/></a>

  • #3
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts
    I did that and it changed it to a comment. So it was hidden

  • #4
    New Coder
    Join Date
    Aug 2007
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by mcjwb View Post
    You need to add http:// to the beginning of the url, i.e.

    Code:
    <a href=\"http://realmofdragons.shirtcity.com\"><img src=\"images/store1.jpg\" border=\"0\" alt=\"Tshirt City\"/></a>
    This must work!

  • #5
    New Coder
    Join Date
    Aug 2007
    Location
    Wagga, Australia
    Posts
    59
    Thanks
    0
    Thanked 1 Time in 1 Post
    It worked fine for me, make sure the http:// is within the quotation marks
    PHP Code:
    echo "<a href=\"http://realmofdragons.shirtcity.com/\"></a>"
    also you didn't state if you were echoing it with php, because if you are not than you don't need to backslash anything, that could be a problem

  • #6
    New Coder
    Join Date
    Aug 2007
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I wondered about that

  • #7
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts
    I changed the image to a javascript image and now the link works flawless. Thanks so much!


  •  

    Posting Permissions

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