data-tooltip from stupid.css gens exception when placed as an attribute into web2py html tag functions

22 views
Skip to first unread message

Niktesla001

unread,
Aug 1, 2020, 1:02:28 AM8/1/20
to web2py-users
Hello there.
In my index.html i was trying to output this text
{{=A(SPAN('MyWord', _data-tooltip='Hey, this is the word of mine!'), _href='word')}}
and it failed miserably (generated an exception).

I was able to fix this by replacing "data-tooltip" with "data_tooltip" in stupid.css and then changing the above code to
{{=A(SPAN('MyWord', _data_tooltip='Hey, this is the word of mine!'), _href='word')}}

But we all want this stuff to work right out of the box, right?

Clemens

unread,
Aug 1, 2020, 4:57:13 AM8/1/20
to web2py-users
Hi,

it doesn't solve your problem. But why not using _title attribute for the standard tooltip functionality?
https://www.w3schools.com/html/tryit.asp?filename=tryhtml_attributes_title

Regards
Clemens

villas

unread,
Aug 3, 2020, 7:43:45 AM8/3/20
to web2py-users
This is a known 'quirk'.
You may find the following section of the book helpful...

Reply all
Reply to author
Forward
0 new messages