is there any script to set all external links to open in new page?
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
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>
Indeed. There aren't many questions asked on this forum to which Google has no answerOriginally posted by I.am@10 May 2004 - 09:34
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...
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
Find and replaceOriginally 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.
To open all links of your page in a new window,
Put this between <head> </head>
Code:<base target="main">
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>
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
Post your source...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
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:<a href="page.html" rel="external">Page</a>
<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>
Bookmarks