Results 1 to 3 of 3

Thread: Textual tooltip Script

  1. #1
    Join Date
    Dec 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Textual tooltip Script

    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

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    This one's invalid:

    Code:
    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:

    Code:
    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    omg! so much for so little

    thank you VERY much

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •