Welcome visitor
* Login
* Register
It is currently March 21st, 2019, 11:46 am
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
  highlight active link
PostPosted: March 18th, 2009, 10:45 pm 
User avatar

Posts: 61
hello,
i have all this links with target to the big iframe
<a href="one.htm" target="big">one</a>
<a href="two.htm" target="big">two</a>
<a href="three.htm" target="big">three</a>
<a href="four.htm" target="big">four</a>
<a href="five.htm" target="big">five</a>
<a href="six.htm" target="big">six</a>
<br />
<br />
<br />
<iframe style="width: 800px; height: 500px; " name="big"></iframe>
what should i do to highlight the link that is currently been displayed on the big iframe?


Top
 Profile  
 
  Re: highlight active link
PostPosted: March 18th, 2009, 10:49 pm 
User avatar

Posts: 79
<script type="text/javascript">
ref = "one";
function highlight(link)
{
document.getElementById(ref).style.backgroundColor= 'transparent';
event.srcElement.style.backgroundColor = '#ff0000';
ref = event.srcElement.id;
}
</script>
<a id="one" onClick="highlight('one');" href="one.htm" target="big">one</a>
<a id="two" onClick="highlight('two');" href="two.htm" target="big">two</a>
<a id="three" onClick="highlight('three');" href="three.htm" target="big">three</a>
<a id="four" onClick="highlight('four');" href="four.htm" target="big">four</a>
<a id="five" onClick="highlight('five');" href="five.htm" target="big">five</a>
<a id="six" onClick="highlight('six');" href="six.htm" target="big">six</a>
<br />
<br />
<br />
<iframe style="width: 800px; height: 500px; " name="big"></iframe>


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