You could try doing mousedown and mouseup, but click is a combination of those two events, so there wouldn't be any "after click" event to hook the creation of the updater to. Also, I know this says 'ad' for the ID, is that indicative of what the actual content is? If so, don't you want a click to actually bubble through to a target link, and navigate the browser to the ad's link destination?

Walter

On Feb 25, 2011, at 3:03 PM, Poll wrote:

Hi.I have this:
if(document.getElementById('ad'))
{
var STOP_ADV = 1;
$("ad").observe('mouseenter', function(e) {Update_adv.stop();});
$("ad").observe('mouseleave', function(e) {


Update_adv = new Ajax.PeriodicalUpdater('ad', '<?=$host;?>/adv1.php',
{'frequency' : 8.0,
                                               'method': 'get',
                                               'parameters': 'cat=' +
catID + '&show=' + <?=$show1;?>,
                                               'onSuccess' :
function(transport){
                                                 var response =
transport.responseText;
                                                 //new
Effect.Opacity('ad', {duration:1.0, from:1.0, to:0.0});
                                                 FXopacity(response);

                                               }
                                               });
});
}
Would be possible to use click event instead mouseenter/mouseleave ?.
Thank you

--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected] . To unsubscribe from this group, send email to [email protected] . For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en .


--
You received this message because you are subscribed to the Google Groups "Prototype 
& script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to