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

    Question HTML Image Link In The Same Window/Tab

    Hey, I have a website and I have Images that link to different pages within the website. This is a sample of the code that I use:

    <a href="Sample.html" target="_blank"><IMG SRC="Sample.jpg"></a>

    Now when someone clicks on the image, it takes them to the new link, however, it opens up a new window/tab when it does that (I use the Google Chrome browser). I want it to open in the same window/tab instead of opening in a new one. How can I change the code to do that?

  • #2
    New to the CF scene
    Join Date
    Jun 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh, and after taking the target="_blank" parts out, on my computer it will open in the same window/tab, but when I updated my website without that code, it still opened in a new window/tab.
    Last edited by danlikebooks; 06-17-2010 at 10:23 PM.

  • #3
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    832
    Thanks
    10
    Thanked 79 Times in 77 Posts
    People's browsers have options as to how links on web pages open when clicked. Check whether you have your browser set to open a new tab/window when you click on a web page link. Also, people can decide to choose whether to open links in a new tab/window by right-click the link and making a selection from the Context Menu.

    I do not recommend using the target="" attribute unless you are using the correct document type that allows or needs it.
    Last edited by Major Payne; 06-19-2010 at 02:46 AM.
    ☠ ☠RON☠ ☠


  •  

    Posting Permissions

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