Hello,
I am trying to get some data via JSON and display it in my tooltips.
It works quite well, but I want to pass a variable to the php script
(term).
This variable I want to get from the tooltip's link "rel" tag(In this
case Germany).
[code=text] <a href="#" class="tips" rel="Germany" title="">germany.</
a> [/code]

[code=text] var term = el.get('rel');   [/code]
The above code does not work inside the "onShow" function.(Object
[object Object] has no method 'get')


[code=text]   
var tipz = new Tips('.tips',{
        className: 'tips',
        fixed: false,
        hideDelay: 50,
        showDelay: 50,
   
    onShow: function(tip,el) {
                var term = el.get('rel');   
    tip.fade('in');
    var req = new Request.JSON({
            method: 'get',
            noCache:true,
            url: 'ajax.php',
                        data: { 'term' : term},
            onRequest: function() {$$('.tip-
text').set('html','<div>loading</div>');  },
           
            onComplete: function(response) {
                $$('.tip-title').set('html','<strong>'+response.header
+'</strong>');
                $$('.tip-text').set('html','<img src="'+response.image
+'"/><strong>'+response.content+'</strong>');
                }
        }).send();
   },
   onHide: function(tip,el) {
    tip.fade('out');
   }
    });
[/code]

How would you do this?
Any ideas?
Thx in advance

To unsubscribe from this group, send email to 
mootools-users+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to