search for: registercallback

Displaying 6 results from an estimated 6 matches for "registercallback".

Did you mean: register_callback
2008 May 07
2
prototype PeriodicalExecuter pause/restart patch
...PeriodicalExecuter = Class.create({ initialize: function(callback, frequency) { this.callback = callback; this.frequency = frequency; this.currentlyExecuting = false; this.lastExec = this.now(); this.paused = false; this.pausedAt = 0; this.accumTimePaused = 0; this.registerCallback(); }, registerCallback: function() { this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); }, execute: function() { this.callback(this); }, pause: function(){ if (this.paused) return; this.stop(); this.paused = true; this.pausedAt = th...
2007 Aug 31
0
observe_field is not working everytime in IE 6.0
...ine in Fire Fox but in IE 6.0 it is not populating second drop down every time. I read in on of the blog and I have made changes in prototype.js to get it worked. I have added code mentioned below in Event Observer function of protype.js file. Previously my prototype.js like this registerCallback: function(element) { if (element.type) { switch (element.type.toLowerCase()) { case ''checkbox'': case ''radio'': Event.observe(element, ''click'', this.onElementEvent.bind(this)); break; de...
2006 Mar 09
2
extending an existing DOM object in a prototype way
...iveSpan class extend it with some functionality (like onclick events, attributes, etc) here''s what I have in mind, but I''m not sure this is exactly correct: var ActiveSpan = Class.create(); ActiveSpan.prototype = { initalize: function(span) { Object.extend(span, this); this.registerCallbacks(); }, registerCallbackss: function() { Event.observe(this, ''click'', clickHandler.bindAsEventListener(this); }, clickHandler: function(e) { this.style.background = "red"; } } does this look right? Also, I''ll eventually want to go through the child ele...
2006 Mar 09
0
RE: extending an existing DOM object in a prototypeway
...setup: function() { //making this an instance method ensures you are wiring up events to a DOM element (i.e. the element has already been extended with this class -- "this" will now be the DOM element extended with the ActiveSpan methods, and not just an "ActiveSpan") this.registerCallbacks(); } registerCallbackss: function() { //ALWAYS store DOM handlers in variables so you can dispose of them (prevent memory leaks) this.clickHandlerPointer = this.clickHandler.bindAsEventListener(this); Event.observe(this, ''click'', this.clickHandlerPointer); }, clickHandl...
2006 Mar 09
0
RE: extending an existing DOM object in aprototypeway
...setup: function() { //making this an instance method ensures you are wiring up events to a DOM element (i.e. the element has already been extended with this class -- "this" will now be the DOM element extended with the ActiveSpan methods, and not just an "ActiveSpan") this.registerCallbacks(); } registerCallbackss: function() { //ALWAYS store DOM handlers in variables so you can dispose of them (prevent memory leaks) this.clickHandlerPointer = this.clickHandler.bindAsEventListener(this); Event.observe(this, ''click'', this.clickHandlerPointer); }, clickHandl...
2005 Nov 04
1
prototype EventObserver on radio option elements
Hi all, I just started using prototype 1.3.1. I''ve successfully used Form.Element.EventObserver on a select list and recently tried to add it to radio options. However, I think there is a flaw in how it works with radio options. Radio options are a little unusual in that there are multiple distinct elements, tied together by a common name, where changing one element causes a