Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Opening All External Links In "_blank" Page

  1. #1
    BawA's Avatar FST Pioneer BT Rep: +1
    Join Date
    Jun 2003
    Location
    Some Where but not here
    Age
    41
    Posts
    4,213
    is there any script to set all external links to open in new page?


    "You can be mad as a mad dog at the way things went; you can swear and curse the fates, but when it comes to the end, you have to let go"
    Benjamen button

  2. Internet, Programming and Graphics   -   #2

  3. Internet, Programming and Graphics   -   #3
    Code:
    <a target="_blank" href="http://www.domain.com">Link</a>

    Btw, may I suggest using google before asking. We are no substitute for the power of google...
    <span style='color:black'> I am a part of all that I have met - Lord Tennyson</span>
    <span style='color:blue'>Try not to let your mind wander...it is too small and fragile to be out by itself</span>

  4. Internet, Programming and Graphics   -   #4
    Originally posted by I.am@10 May 2004 - 09:34
    Code:
    &#60;a target=&#34;_blank&#34; href=&#34;http&#58;//www.domain.com&#34;&#62;Link&#60;/a&#62;

    Btw, may I suggest using google before asking. We are no substitute for the power of google...
    Indeed. There aren&#39;t many questions asked on this forum to which Google has no answer

  5. Internet, Programming and Graphics   -   #5
    BawA's Avatar FST Pioneer BT Rep: +1
    Join Date
    Jun 2003
    Location
    Some Where but not here
    Age
    41
    Posts
    4,213
    setting one link a time is easy but if u have lots of links that u want them to open in new page will be hard to set them one by one so i want some kind of code or script that sets all external links to open in new page.


    "You can be mad as a mad dog at the way things went; you can swear and curse the fates, but when it comes to the end, you have to let go"
    Benjamen button

  6. Internet, Programming and Graphics   -   #6
    Originally posted by bawa@Klite_user@10 May 2004 - 09:38
    setting one link a time is easy but if u have lots of links that u want them to open in new page will be hard to set them one by one so i want some kind of code or script that sets all external links to open in new page.
    Find and replace

  7. Internet, Programming and Graphics   -   #7
    To open all links of your page in a new window,

    Put this between <head> </head>

    Code:
    &#60;base target=&#34;main&#34;&#62;

    Use your <head> wisely.
    <span style='color:black'> I am a part of all that I have met - Lord Tennyson</span>
    <span style='color:blue'>Try not to let your mind wander...it is too small and fragile to be out by itself</span>

  8. Internet, Programming and Graphics   -   #8
    BawA's Avatar FST Pioneer BT Rep: +1
    Join Date
    Jun 2003
    Location
    Some Where but not here
    Age
    41
    Posts
    4,213
    thats easy but i dont want ma own page links like menu links to open in new page only external links like a link to a other site to open in new page


    "You can be mad as a mad dog at the way things went; you can swear and curse the fates, but when it comes to the end, you have to let go"
    Benjamen button

  9. Internet, Programming and Graphics   -   #9
    Originally posted by bawa@Klite_user@10 May 2004 - 09:56
    thats easy but i dont want ma own page links like menu links to open in new page only external links like a link to a other site to open in new page
    Post your source...

  10. Internet, Programming and Graphics   -   #10
    I can write a script that opens the specified url in the new window whenever you call it. But its useless. You still have to give the function in onclick of the link so why not just take a step back and add the target as well.

    Btw, FYI in html 4.01 target field is deprecated. They added a "rel" instead.

    eg:
    Code:
    &#60;a href=&#34;page.html&#34; rel=&#34;external&#34;&#62;Page&#60;/a&#62;
    <span style='color:black'> I am a part of all that I have met - Lord Tennyson</span>
    <span style='color:blue'>Try not to let your mind wander...it is too small and fragile to be out by itself</span>

Page 1 of 2 12 LastLast

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
  •