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 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Apr 2008
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Seemingly simple problem with HTML hyperlinks

    I am trying to place an assortment of links on a site, however, the links I am placing are comming out like this:

    http://www.evaluation.com/mmarsha/www.evaluation.com/sound/audiosample.mp3

    the bolded portion of the link would be an example of one of the sites I'm placing the hyperlink on. the italicised portion is what I actually want the link to go to, but it adds the bolded portion when it opens in the browser. Heres an example of the code im using:

    <ahref="www.evaluation.com/sound/Audiosample.mp3">Audiosample - Example 1</a>

    Can anyone see any defect in that piece of code? or is this symptomatic of another part of the code I have to troubleshoot?

  • #2
    Regular Coder
    Join Date
    May 2008
    Location
    Oxford, UK
    Posts
    422
    Thanks
    14
    Thanked 27 Times in 27 Posts
    <a href="http://www.evaluation.com/sound/Audiosample.mp3">Audiosample - Example 1</a>

    If you dont add the "http://" it will treat 'www....' as the name of a directory in your root

  • Users who have thanked brazenskies for this post:

    JohnnyMar (05-21-2008)

  • #3
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,179
    Thanks
    174
    Thanked 257 Times in 257 Posts
    not sure if you are in the same site, but try this

    Code:
    <a href="/sound/Audiosample.mp3">Audiosample - Example 1</a>
    or if that site is external to urs try this

    Code:
    <a href="http://www.evaluation.com/sound/Audiosample.mp3">Audiosample - Example 1</a>
    see if that helps

  • Users who have thanked jcdevelopment for this post:

    JohnnyMar (05-21-2008)

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,486
    Thanks
    6
    Thanked 981 Times in 954 Posts
    Also watch out for a base element in your document header. It sets the base URL to use for links so it will make all your relative URLs (dir/file.ext) absolute (http://example.com/dir/file.ext) unless you specify an absolute URL manually.

  • Users who have thanked VIPStephan for this post:

    JohnnyMar (05-21-2008)

  • #5
    New to the CF scene
    Join Date
    Apr 2008
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Wow, every possible angle covered, my gratitude could never be expressed in words!

  • #6
    New to the CF scene
    Join Date
    Apr 2008
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts
    and for those who are keeping score, it was contestant number 3, Kudos for being to figure out what was wrong with my page without even seeing the code that was screwing things up!


  •  

    Posting Permissions

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