PDA

View Full Version : Textual tooltip Script



xerc
12-17-2006, 10:37 PM
1) Script Title:
Textual tooltip Script

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex5/linkinfo.htm

3) Describe problem:
http://xerc.biz/test1.html
http://xerc.biz/test2.html

look at the source at those two. The only difference is that test2 has alot more variables in the array. And it dosent work?!
like, is it some kind of restrictions? or what?

it would be cool if i managed to show the seat's username by hovering the seat :D

jscheuer1
12-17-2006, 10:57 PM
This one's invalid:


content[56]='Alex\'

In javascript, the downslash (\) means to, in many circumstances, treat the next character differently depending upon its original nature. If it is a character with a special function as the delimiting closing single quote (') is here, the difference is that it will not have its special function and will be treated as a normal character. This breaks the array and the script. You could write it like so:


content[56]='Alex\\'

That way, the downslash would escape itself, making it a single literal downslash and the the closing quote would still have its original meaning as a closing delimiter.

xerc
12-17-2006, 11:24 PM
omg! so much for so little :(

thank you VERY much :D