Guest User

Untitled

a guest
Jun 24th, 2012
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function ddrivetip(thetext, thecolor, thewidth){
  2.     if (ns6||ie){
  3.         if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
  4.         if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
  5.         //Is there a way to account for \n as newline
  6.         tipobj.innerHTML=thetext
  7.         enabletip=true
  8.         return false
  9.     }
  10. }
  11. /*
  12. Sample Call
  13. <div id="shoulder" ONMOUSEOVER="ddrivetip('1 Armor<br /><a href="/class.php?c=Monk&d=Shoulder">Shoulder</a><br />&nbsp;&nbsp;&nbsp;All Resistance: 1<br />','black')"; ONMOUSEOUT="hideddrivetip()" style="background-image: url(images/Shoulder.png);"></div>
  14.  
  15. When the first variable given to ddrivetip is plaintext, that is to say no html at all, it works fine. If I add HTML it breaks and doesn't display as a tool tip.
  16.  
  17. This is displayed on the div
  18.  
  19. Shoulder
  20. All Resistance: 1
  21. ','black')"; ONMOUSEOUT="hideddrivetip()" style="background-image: url(images/Shoulder.png);">
  22.  
  23.  
  24. so it would seem that the link is breaking it?
  25. */
Advertisement
Add Comment
Please, Sign In to add comment