Results 1 to 7 of 7

Thread: replacement for target="_blank" in XHTML 1 Strict?

  1. #1

    Thread Starter
    Hyperactive Member CaptainPinko's Avatar
    Join Date
    Jan 2001
    Location
    London, Ontario, Canada
    Posts
    332

    Question replacement for target="_blank" in XHTML 1 Strict?

    I'm working on a webpage and the client has specifed that they want the page to be XHTML 1.0 Strict compliant. I managed to get everything according to standard except for two links which use target="_blank", does anyone know the appropriate way to do this in xhtml strict?
    "There are only two things that are infinite. The universe and human stupidity... and the universe I'm not sure about." - Einstein

    If you are programming in Java use www.NetBeans.org

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: replacement for target="_blank" in XHTML 1 Strict?

    In my personal opinion, there is no appropriate replacement for target="_blank" because target="_blank" is not appropriate in the first place. It's my browser, and my decision alone when to open new windows.

    Other than that, you'll have to use JavaScript.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Hyperactive Member CaptainPinko's Avatar
    Join Date
    Jan 2001
    Location
    London, Ontario, Canada
    Posts
    332

    Re: replacement for target="_blank" in XHTML 1 Strict?

    Hmm, alright. Well I'm working on a site for an artist and as part of their portfolio they want to be able to click on a link and have a website popup that happened to use some of their artwork. Having it open in the same site would not be beneficial since you are litterally pushing customers away from your site. However, I am sensitive to alternative browser user so I want to be as standard compliant as possible. Is there any acceptable way of doing this (does anyone have any suggestions)? I could use Transitional which allows the target="" but I'd rather work something out if indeed possible.
    "There are only two things that are infinite. The universe and human stupidity... and the universe I'm not sure about." - Einstein

    If you are programming in Java use www.NetBeans.org

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: replacement for target="_blank" in XHTML 1 Strict?

    If the user wants the site in a new window, they'll hold down Shift/Ctrl when clicking the link. If they have already seen enough of the site, it's unfair and annoying to keep them on it.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5
    Fanatic Member McCain's Avatar
    Join Date
    Jan 2002
    Location
    Sweden/Denmark
    Posts
    802

    Re: replacement for target="_blank" in XHTML 1 Strict?

    Personaly when I'm on a site and click on a link I want to be able to use the "Back" feature of my browser to go back to where I were before. But I that link I clicked on opened a new window that wouldn't work and I don't like that.

    What you could do is to open the link in the same window, but have a small fram at the top that the user can click to go back to the main page. It would say something like "You are now visiting a site outside of www.artist.com. Click here to go back." But don't forget to put a button somewhere that removes that frame. Google uses something like this in their image search or if you go to a cached page.
    Never argue with fools, they will only drag you down to their level, and beat you with experience.

    Q: How do you tell an experienced hacker from a novice?
    A: The latter thinks there's 1000 bytes in a kilobyte, while the former is sure there's 1024 meters in a kilometer

  6. #6
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: replacement for target="_blank" in XHTML 1 Strict?

    The reason target was remove from the XHTML specification was becuase it forces the user to open a new window and it also makes it a real annoyance accessibility wise for those who have sight imparements and disabilities.

    If you want your image to open in a new window simply use a popup. You can test if the popup was blocked and make other arrangments should this be the case.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  7. #7
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090

    Re: replacement for target="_blank" in XHTML 1 Strict?

    You could use JavaScript to make a "fake-popup". It doesn't actually make a popup, but instead it makes a div visible. You could have this div simulate a window (draggable, closable etc). and have it contain the div.

Posting Permissions

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



Click Here to Expand Forum to Full Width