Found the following on a page - title="header=[] body=[ - how does it work?

77 views Asked by At

Go to http://www.paperbackswap.com/Science-Fiction-Hall-Fame-Volume/book/0765305372/

Scroll down looking for a button labeled "Order This Book" and hover over it.

It displays a multi-line "title"

The source shows:

title="header=[] body=[Did you know that you help the club if you make your Amazon purchases by starting on our site?  Just click here when you want to buy anything from Amazon and your purchase will support PBS!]"

Note - if you inspect the entity using Firebug, it shows title=""

To see the source that I am showing you, view the source of the page.

Tried to search on title="header[] but Google can't handle it with the double quote and [] characters.

Does anyone know how this is working?

It would appear to be a facility by which the text in "header[]" is displayed, perhaps, as a header line for the "title" and the text in "body[]" is the body of the "title."

Here is another example with line breaks:

title="header=[] body=[- Order this book for $4.94 (price includes S&H).<br />- If you are a member, please Log In to request it.<br />- Or join the Club and get this book for 1 credit and a $0.49 swap fee.]"

To see the results, hover over the image of a key to the right of the "Order This Book" button.

Bob

1

There are 1 answers

4
BoltClock On

Evidently, there is a script that reads the title attribute, parses its contents in its own format (as in the header=[...] and body=[...] parameters), creates a custom tooltip with the information from the parsed contents, and empties the title attribute once it's done to prevent the system tooltip from displaying over the custom one (which is why the inspector displays the title attribute as empty).

Searching for just title=header without the quotes or square braces turns up a script called BoxOver, which uses the same syntax and renders similar-looking tooltips, but in this case the header appears to be unused, and in fact I can find no references to BoxOver in any of the scripts being used by the page. Either the source is obfuscated or we're looking at a different script entirely, but the principle is the same.