Need some help with small bit of code

Demon

Banned
Jun 15, 2007
1,143
12
0
London, UK
www.aminology.com
Ok so I'm using the SocialTwist tellafriend on a website, but the problem is the code they give is for an image.

Code:
<script type="text/javascript" src="http://cdn.socialtwist.com/2009081823242/script.js"></script><a class="st-taf" href="http://tellafriend.socialtwist.com:80" onclick="return false;" style="border:0;padding:0;margin:0;"><img alt="SocialTwist Tell-a-Friend" style="border:0;padding:0;margin:0;" src="http://images.socialtwist.com/2009081823242/button.png"onmouseout="STTAFFUNC.hideHoverMap(this)" onmouseover="STTAFFUNC.showHoverMap(this, '2009081823242', window.location, document.title)" onclick="STTAFFUNC.cw(this, {id:'2009081823242', link: window.location, title: document.title });"/></a>
I want to keep the same features of the code but have it applied to text instead of an image. At the moment I'm doing this by removing the image url which forces it to display the alt text. The problem is this looks fine in Firefox, but in IE it looks iffy. Any idea how to change?
 


Just remove the entire image tag use the alt text instead

Code:
<a class="st-taf" href="http://tellafriend.socialtwist.com:80" onclick="return false;" style="border:0;padding:0;margin:0;">SocialTwist Tell-a-Friend</a>
 
Just remove the entire image tag use the alt text instead

Code:
<a class="st-taf" href="http://tellafriend.socialtwist.com:80" onclick="return false;" style="border:0;padding:0;margin:0;">SocialTwist Tell-a-Friend</a>
That doesn't work. I need to keep the javascript so it behaves in the same way as intended. Put the original code in an html file and see how it looks. Then compare it to yours and you'll see what I mean.
 
This seems to work ...

Code:
<script type="text/javascript" src="http://cdn.socialtwist.com/2009081823242/script.js"></script><a class="st-taf" href="http://tellafriend.socialtwist.com:80" onclick="return false;" style="border:0;padding:0;margin:0;"><span id="spantest" onmouseout="STTAFFUNC.hideHoverMap(this)" onmouseover="STTAFFUNC.showHoverMap(this, '2009081823242', window.location, document.title)" onclick="STTAFFUNC.cw(this, {id:'2009081823242', link: window.location, title: document.title });" >Text</span></a>
 
  • Like
Reactions: Demon
This seems to work ...

Code:
<script type="text/javascript" src="http://cdn.socialtwist.com/2009081823242/script.js"></script><a class="st-taf" href="http://tellafriend.socialtwist.com:80" onclick="return false;" style="border:0;padding:0;margin:0;"><span id="spantest" onmouseout="STTAFFUNC.hideHoverMap(this)" onmouseover="STTAFFUNC.showHoverMap(this, '2009081823242', window.location, document.title)" onclick="STTAFFUNC.cw(this, {id:'2009081823242', link: window.location, title: document.title });" >Text</span></a>
Excellent! And for your reward I will grant you a rep bar full of orange :)