I am fully updating the contents of DIV with an Ajax.Updater
and
cannot get Behaviour.apply to reapply my rules. I have a
simple set of
rules:
var pfmRules = {
"li.pfmList" : function(el) {
el.onmouseover = function(e) {
.....
},
el.onmouseout = function(e) {
......
},
el.onclick = function(e) {
.....
}
}
};
I have a globally scoped var updater (prototype v1.4.0)
that is
initialized here:
updater = new Ajax.Updater(
DIV,
URL,
{
method:"get",
evalScripts:false,
onComplete: ApplyBehaviours
});
My ApplyBehaviours() is simple, and I know it runs because I
can insert
an alert(someting) and get an alert. The function is:
function ApplyBehaviours()
{
Behaviour.apply();
}
The code is executed properly the first go-around. The DIV
is only
populated by the Ajax.Updater, but it won't apply my rules
more than
once.
The process flow is:
therules = ......
Behaviour.register(therules)
new Ajax.Updater(....) onComplete: Behaviour.apply()
--->> success
new Ajax.Updater(....) onComplete: Behaviour.apply()
--->> failure
Has anyone dealt with this before? Thanks in advance for
the help.
Great work on the library Ben and everyone else.
Dan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Behaviour Javascript Library"
group.
To post to this group, send email to behaviour googlegroups.com
To unsubscribe from this group, send email to
behaviour-unsubscribe googlegroups.com
For more options, visit this group at http://group
s.google.com/group/behaviour
-~----------~----~----~----~------~----~------~--~---
|