So I went ahead and purchased a link on a directory that lists my link with a javascript redirect. More specifically, the owner uses the following code within the <a> tag: Can this type of link be followed by the SE's or do they get stuck? Thanks for the help!
I am sure it won't count as a link by SEs. The tag has to have URL in order for SEs to see it as well as follow-able. By checking a page via page source, if you can't see it, then SE won't see the URL either.
When I coded my directory, I had faced a problem. I wanted to track the visits through my directory and make it open within a frame so that users can rate the site. But since I wanted my directory to be search engine friendly, I also wanted to provide direct link to the site too. So I did a similar solution. I gave a direct link to the site and on the page load, an onclick event was added to the link to force it open within my frame. Hence for the search engine it is a direct link, wheras for a user it opens within a frame in my site.
In the case the url is in html, it could be read by SEs, so it's possible that it is SE friendly. Unfortunately, I am not too certain. But as long as the tag with url in it, SEs could see it. I know another case that SEs recognize it. <a href="yoursite.com">anchor</a>