On Thu, Oct 9, 2008 at 12:03 PM, Mauro Marchiori Neto
<[EMAIL PROTECTED]> wrote:
> setInterval right? wouldnt it overload the browser?
Not necessarily, as long as your URL checking function is simple and
you don't check very frequently. Say, something like this:
var AnchorChecker = {
initialize: function(){
this.location = location.href;
this.interval = setInterval(function(){
if (this.location != location.href) this.anchorAltered();
}.bind(this), 500); // check every half second
},
anchorAltered: function(){
// the url has been altered
}
};
AnchorChecker.initialize();
^ 100% untested, beware
-justin
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---