1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

piece of code to direct to a point of my page?

Discussion in 'HTML & Website Design' started by Scolder, May 1, 2009.

  1. #1
    Hi, I'm not experienced with editing but would like to know if anyone knows if it's possible to add a piece of html code and direct the viewers to a specific part of my web page, instead of loading at the top of the page?
     
    Scolder, May 1, 2009 IP
  2. gummyworms

    gummyworms Active Member

    Messages:
    126
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #2
    gummyworms, May 1, 2009 IP
  3. Sparx-Media

    Sparx-Media Banned

    Messages:
    93
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That would require php from my understanding. Or some other script, there might be a way to do it with javascript, but I'm not sure it is possible with html alone.
     
    Sparx-Media, May 1, 2009 IP
  4. alfa_375

    alfa_375 Active Member

    Messages:
    445
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #4
    It is quite easy!

    Lets say you want your visitor to move to line no 20. just go to line no.20 in and place a tag like the below

    <a name="section1"> 
    Code (markup):
    here is the tag <a name> and section1 is the name you want to identify that location or block or paragraph or line etc.

    You can call that link like this:
    <A href="#section1">My section</A><BR>
    Code (markup):
    Now how do you call that link from another link
    [url]http://www.yourdomain.com#section1[/url]
    Code (markup):
    I hope you got some idea.

    Regards,
    Amer
     
    alfa_375, May 1, 2009 IP
    CrazyJugglerDrummer likes this.
  5. Scolder

    Scolder Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks, that seemed to work. I placed the

    <p><a name="section1">
    </a><a href="#section1">My section</a></p>

    at one point of the page

    and then went to another page and placed the link

    http://mydomain.com#section1

    and when hiting the link it directed me to the section of the first page.

    But what I'm really trying to do is get the viewers directed to a specific part of my homepage automatically without pressing at any link but by simply typing my site's URL, instead of directed at the top of my homepage and maybe every page... How do I do that?
    Thanks.
     
    Scolder, May 2, 2009 IP
  6. gummyworms

    gummyworms Active Member

    Messages:
    126
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #6
    gummyworms, May 2, 2009 IP
  7. Scolder

    Scolder Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    This seens to work thanks.
     
    Scolder, May 3, 2009 IP
  8. CrazyJugglerDrummer

    CrazyJugglerDrummer Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    You should specify the name and the id attribute of the a tag as them same thing. This will allow for forward and backward compatibility. :D
     
    CrazyJugglerDrummer, May 3, 2009 IP
  9. Shirley1874

    Shirley1874 Peon

    Messages:
    558
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Shirley1874, May 7, 2009 IP