Results 1 to 5 of 5

Thread: target

  1. #1
    Star Lounger
    Join Date
    Sep 2003
    Location
    Texas, USA
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    target

    I am trying (with no luck) to set up a target in another document, same directory, same website.



    In the first document, I typed:

    History and Deed Restrictions, August 2004

    In the target document,

    <target=_history><H3 font="arial" color="#212121">Neighborhood History</font></H3>

    When I click on the link in the first document, I am directed to the correct document, but not to the target.

    Also, please note the <H3 font="arial" color="#212121"> in the target document. It does not affect the text.

    I cannot figure out what I am doing wrong in either case. Help?!

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: target

    I think I see what you're trying to do... Target is used for something different than what you want to do here.

    You want to use the Anchor tag (<a>) to create a named anchor in your destination document, so you can jump directly to that location from a link. Is this correct?

    Your link should look like this: YourText
    (Notice the Hash/Pound sign after the document, followed by the anchor name.)

    Your destination should look like this: <a name="YourAnchorName">YourText</a>
    (The name attribute can be anything you want as long as your link matches it. I normally choose names without spaces for simplicity sake.)

    Just to clarify, Target is used to open the desired link in a specific frame or a new window. For example, if you had a frameset in your document you could set the target property for the Navigation bar to open in the Body frame.

    Please see W3Schools for more details...

  3. #3
    Star Lounger
    Join Date
    Sep 2003
    Location
    Texas, USA
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: target

    Thank you SO much! I have Castro's "HTML for the WWW," but still ended up with a major HTML headache trying to figure out the instructions. I was successful with your instructions, even though I did not include the </A> in the destination document. I'm still confused what text I would have set off anyway. <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

  4. #4
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: target

    I'm glad you were able to make it work.

    Closing the Anchor tag is not necessarily required by most browsers, but it's a good practice. Many browsers (especially Internet Explorer) are very forgiving with less-than-perfect HTML and Javascript code, although many are less forgiving. For the sake of the small percentage of browsers that require it, or for the even smaller percentage of geeks out there who appreciate well-formed HTML and XHTML, it's a good idea to get in the habit of closing all applicable tags.

    As for what to include inside the named anchor tags, I normally include the first line of text in situations where there's a title followed by text. If the destination is less obvious (like a paragraph), I usually include just the first word. The browser and end-user will never actually see what's included inside the Anchor tag - just the fact that the browser automatically scrolls to the desired location.

    Hope this helps

  5. #5
    Star Lounger
    Join Date
    Sep 2003
    Location
    Texas, USA
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: target

    You are a GREAT help! I never would have figured this out... well, perhaps after suffering through much angst and going through a bottle of Tylenol. Again, thank you! <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23>

Posting Permissions

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