There are a few ways to go about this. One elegant solution is to re-route any click action occurring within the scroller, and if it's a link, perform a custom action (such as opening the link in a popup) while disabling the default behavior of following through with the link. Given the below sample initialization code, the added code in red does this:
Code:
<script type="text/javascript">
//new pausescroller(name_of_message_array, CSS_ID, CSS_classname, pause_in_miliseconds)
new pausescroller(pausecontent, "pscroller1", "someclass", 3000)
document.write("<br />")
new pausescroller(pausecontent2, "pscroller2", "someclass", 2000)
var myscroller=document.getElementById('pscroller1')
myscroller.onclick=function(e){
var evt=e || window.event
if (!evt.target)
evt.target=evt.srcElement
if (evt.target.tagName=="A")
window.open(evt.target.href) //custom action to perform on clicked link
if (evt.preventDefault) //stop link from following through
evt.preventDefault()
else
return false
}
</script>
You'll want to change the line in red to perform the desired action when a link is clicked on, such as call your popup window function with the passed link.
Bookmarks