SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    other anchor properties

    Hi Experts,

    I'm just starting learning HTML and CSS tags. I have two questions which vague in my mind about anchors. <a href=audio.html>AUDIO</a>. Now, my questions are:

    1. What properties of anchor to be added if I want to open audio.html into different or new IE window. Can it be added in CSS?

    2. Is it possible to link an executable file like .exe or .com with HTML and how?

    Thanks for your help....

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,806
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    Hi,
    To answer you questions:
    1)you can set the target attribute for your link to define if it is to open in a new window, the same window, the frame it's in.
    Code:
    <a href="audio.html" target="_blank">AUDIO</a>
    will open it in a new window.

    2) yes its possible to link to any file extention just in the same way as above. but be careful when linking to exe files for obvious reasons

    Cheers
    Spike
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  3. #3
    SitePoint Enthusiast myinnet's Avatar
    Join Date
    Jul 2006
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <a href="audio.html" target="_yourname">AUDIO</a>
    You can use this code to open the page in new windows, and all other link with the same target will display at the same page.

  4. #4
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Spike

    Thanks for sharing your thoughts. It really helps... Is there a way we can avoid file open save dialog box being opened when an executable file link is clicked. I'm making website for my internet cafe, sites are shown only for private used. As much as possible I want to make my sites convenient for my users. Aside instead of finding applications from the start menu. Users will now run programs thru my webpage links as well.

  5. #5
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,806
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by savvyuser
    Is there a way we can avoid file open save dialog box being opened when an executable file link is clicked.
    No, by default browsers wont let you autorun exe files due to the high probablilty that it might be suspicious and damaging.
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  6. #6
    The Mind's I ® silver trophy Dark Tranquility's Avatar
    Join Date
    Sep 2003
    Location
    KSA - UAE
    Posts
    9,457
    Mentioned
    8 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by spikeZ
    Hi,
    To answer you questions:
    1)you can set the target attribute for your link to define if it is to open in a new window, the same window, the frame it's in.
    Code:
     <a href="audio.html" target="_blank">AUDIO</a>
    will open it in a new window.

    2) yes its possible to link to any file extention just in the same way as above. but be careful when linking to exe files for obvious reasons

    Cheers
    Spike
    target="_blank" is considered as a usability obstruction, it is also deprecated! a small javascript function can work better!

  7. #7
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Location
    Omaha, NE
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm glad this was brought up. When accessibility is concerned, it's bad, in general, to open pages in new windows. If you must, though, at least put a notice that the page opens in a new window.

    Quote Originally Posted by Dark Tranquility
    target="_blank" is considered as a usability obstruction, it is also deprecated! a small javascript function can work better!

  8. #8
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,806
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    THEY HAVE DEPRECATED target="_blank"?!!!!!!!!

    The swines

    Oh well, back the the document.location then *shuffles off*
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  9. #9
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by spikeZ
    THEY HAVE DEPRECATED target="_blank"?!!!!!!!!
    Ah, yeah, about 8 years ago.
    Simon Pieters

  10. #10
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,806
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    bugger
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....


Bookmarks

Posting Permissions

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