sniperman
08-16-2009, 08:29 AM
Just a quick one.
I have an anchored list and need two events to happen when someone clicks on the link. Both of them involve href.
The first is for href="#1" to focus the user to the specified page area.
The second is to invoke a javascript function.
<ul>
<li><a href="#1""javascript:highlightCode('1')">TEXT TEXT</a></li>
</ul>
<div id="1">
</div>
I know anchors allow multiple javascript statements but i don't know how to use javascript to focus on a specific area in the document before the script is executed.
Thanks in advance
I have an anchored list and need two events to happen when someone clicks on the link. Both of them involve href.
The first is for href="#1" to focus the user to the specified page area.
The second is to invoke a javascript function.
<ul>
<li><a href="#1""javascript:highlightCode('1')">TEXT TEXT</a></li>
</ul>
<div id="1">
</div>
I know anchors allow multiple javascript statements but i don't know how to use javascript to focus on a specific area in the document before the script is executed.
Thanks in advance