Welcome visitor
* Login
* Register
It is currently March 23rd, 2019, 8:27 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  fixing links
PostPosted: August 20th, 2009, 6:13 am 
User avatar

Posts: 71
hi, i have a big code with a lot of links on it. And i want all of them to have the same target, some have _blank other to frame names, but now i want to fix that and give all target to _blank.

do you know the easiest way to do it?

im familiar with the <base target="_blank"> but unfortunately that works only for links that do not already have an inline target. Do you know any other way to get around this?


Top
 Profile  
 
  Re: fixing links
PostPosted: August 20th, 2009, 4:21 pm 

Posts: 57
<script type="text/javascript">                               
  function changeTarget(){
  n = document.getElementsByTagName('a');
  for (i=0; i<n.length; i++){
  n[i].target='_blank';}
}
</script>
<input type="button" value="change targets" onclick="changeTarget();" />


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron