domTT, Behaviour, prototype - Ajax Example (Help Needed)

7 views
Skip to first unread message

neil.bi...@gmail.com

unread,
Oct 25, 2006, 9:40:18 AM10/25/06
to DOM Tooltip Library
I'm trying to apply domTT, Behaviour & prototype in this example but I
cannot get it to work. Perhaps someone can help....

var tooltips = {
'img.thumb' : function(element) {
element.onmouseover = function(event) {
var opt = {
method: 'post',
postBody: params,
onSuccess: function(t) {
var tooltipContent = '';

/* Some code that will generate XHTML to populate the tooltip
...
*/

domTT_activate(this, event,
'content', tooltipContent,
'type', 'velcro',
'styleClass', 'tooltip',
'closeAction', 'destroy'
);

},
on404: function(t) {
alert('Error 404: location "' + t.statusText + '" was not
found.');
},
onFailure: function(t) {
alert('Error ' + t.status + ' -- ' + t.statusText);
}
}

new Ajax.Request('some_url.html', opt);
}
}
}
Behaviour.register(tooltips);

Reply all
Reply to author
Forward
0 new messages