SHOW:
|
|
- or go back to the newest paste.
| 1 | function ddrivetip(thetext, thecolor, thewidth){
| |
| 2 | - | if (ns6||ie){
|
| 2 | + | if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px" |
| 3 | - | if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px" |
| 3 | + | if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor |
| 4 | - | if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor |
| 4 | + | tipobj.innerHTML=thetext |
| 5 | - | //Is there a way to account for \n as newline |
| 5 | + | enabletip=true |
| 6 | - | tipobj.innerHTML=thetext |
| 6 | + | return false |
| 7 | - | enabletip=true |
| 7 | + | |
| 8 | - | return false |
| 8 | + | |
| 9 | - | } |
| 9 | + | |
| 10 | <div id="shoulder" ONMOUSEOVER="ddrivetip('1 Armor<br /><a href="/class.php?c=Monk&d=Shoulder">Shoulder</a><br /> All Resistance: 1<br />','black')"; ONMOUSEOUT="hideddrivetip()" style="background-image: url(images/Shoulder.png);"></div>
| |
| 11 | ||
| 12 | 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. | |
| 13 | ||
| 14 | This is displayed on the div | |
| 15 | ||
| 16 | Shoulder | |
| 17 | All Resistance: 1 | |
| 18 | ','black')"; ONMOUSEOUT="hideddrivetip()" style="background-image: url(images/Shoulder.png);"> | |
| 19 | ||
| 20 | ||
| 21 | so it would seem that the link is breaking it? | |
| 22 | */ |