search for: stopobserv

Displaying 20 results from an estimated 37 matches for "stopobserv".

2006 Jan 18
2
Event.stopObserving and anonymous functions
...the table cells in a table (mouseover, mouseout, clickk). However, I'm also ditching the table and replacing it with an Ajax.Updater so I want to remove all the observers before I lose them. Unfortunately, the Event.observe calls were written as inline anonymous functions so, when calling Event.stopObserving, I'm supposed to pass in a reference to the observer function, but it isn't able to be referenced as far as I know. I'd use Event.unloadCache() as a brute-force solution, but there are a ton of other observers for other areas of the page that would all have to be re-created. Is the...
2006 Mar 15
3
prototype.js Event.stopObserving
anyone have any information on how to effectively use this? Event.observe() doesn''t return anything, and nothing I''ve tried is actually removing the event listeners from the objects. -Jeremy -- Jeremy Kitchen ++ kitchen-RA8HwDor7flnDGu+y90WmgC/G2K4zDHf@public.gmane.org In the beginning was The Word and The Word was Content-type: text/plain -- The Word of Bob.
2006 Dec 14
17
Should Event.stopObserving() remove itself from cache?
Just wondering why Event.stopObserving() doesn''t remove the itself from the Event.obervers array? Is there a reason for this? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, se...
2006 Mar 04
1
RE: Question about event listener highlighting withchild elements
...hen defining your event handlers, assign them to variables so you have a handle to properly dispose of them, like this: this.mouseOver_Listener = this.highight.bindAsEventListener(this); Event.observe(this, "mouseover", this.mouseOver_Listener); ...now this will work... Event.stopObserving(this, "mouseover", this.mouseOver_Listener); ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Casey O''Neill Sent:...
2006 Nov 28
1
observe_form, observe_field, dynamic forms help
.... observe_form does not work for elements added after initial page load. observe_field does not work for radio_buttons except on the first ''click'' It was suggested that I stop observe_field before changes are made to the form then restart it. With much searching I found a Event.stopObserving method, but I''m not certain how to apply this to my observe_form observer. >From the source: new Form.EventObserver(''process_call_form'', function(element, value) {new Ajax.Request(''/rails/assistant/add_element'', {asynchronous:true, evalScripts:tru...
2007 Aug 31
5
prototype
Hi, is there some way to remove all event listeners for the specific element? Thanks for help. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group,
2006 Aug 17
6
Creating Custom Events using prototype
Hi guys! i know prototype can create custom events and can subscribe to it, but is there already a library for this? thanks! -- <script> ////////////////////////////////////////////////////////////////////////////////// REDBAKS=function (){ var b,r,i,a,n="b=''646f63756d656e742e777269746528225"+ "4686572652773206d6f7265207468616e206f6e65207761792"+
2006 Nov 30
12
Disable autocomplete (Ajax.Autocompleter) on the fly.
I''m sure there is an easy way to do this, but it is one of those things that is incredibly difficult to search for. How can I disable an ''Ajax.Autocompleter'' element from working ''on the fly''? I have a page where I''m using two (I know it''s crazy) Ajax.Autocompleter elements and once one of them has got a result I want the other field
2006 Mar 04
0
Question about event listener highlighting with child elements
...9;'s id is currently. I want only the child to be highlighted and the child(not parent) id to be displayed. The second issue is stopping the event listeners when the objects are deactivated. At some point I take the list of objects and deactivate each one. In the deactivate method I Call Event.stopObserving. This seems to have no effect because the highlight method continues to be called. Thanks for you help. Casey /*****************************************************************/ var secureComponent = Class.create(); secureComponent.prototype = { idPath : 0, console : '''...
2006 Feb 10
1
Stopping an observe event
If I want to stop observing a div Is this the format? Event.stopObserving($(''''mydiv''),''click''); Deco
2005 Oct 05
5
InPlaceEditor crash on Safari
Quick question.. I often crash my Safari when using ''Enter'' on InPlaceEditor''s for submitting. Works fine on firefox(win & Mac) - no javascript errors. Anyone else seen this behavior? (Maybe it is just my alterings of InPlaceEditor :-) Best Regards Michael Krog
2007 Apr 17
4
close a div when click out of the div
...use of Event: mostraDivHelp(div) { //If is there a div "open" I hide it. if (SHEEBOO_scambio[''divHelp''] !== undefined && SHEEBOO_scambio[''divHelp''] != null) { $(SHEEBOO_scambio[''divHelp'']).hide(); Event.stopObserving(document,''click'',function(e) {if ( e.target.attributes !== undefined) return false;nascondiDivHelp(div);}); } SHEEBOO_scambio[''divHelp''] = div; $(div).setStyle({display:''block''}); SHEEBOO_scambio[''primoClick''...
2006 Mar 03
3
Ajax.InPlaceEditor - disabling the yellow highlight?
Is there a way to disable Ajax.InPlaceEditor''s yellow rollover highlight?
2006 Jan 25
0
Making an unload event work with prototype
....1.4.0 prototype.js --- prototype.js.1.4.0 2006-01-25 16:48:43.575591720 +0000 +++ prototype.js 2006-01-25 16:45:59.765494640 +0000 @@ -1511,8 +1511,10 @@ unloadCache: function() { if (!Event.observers) return; for (var i = 0; i < Event.observers.length; i++) { - Event.stopObserving.apply(this, Event.observers[i]); - Event.observers[i][0] = null; + if (!(Event.observers[i][1]=="unload")) { + Event.stopObserving.apply(this, Event.observers[i]); + Event.observers[i][0] = null; + } } Event.observers = false; }, Chris
2005 Dec 14
1
Problem stopping default event in Safari
...implicity) // then stop the defaultevent if(e) { Event.stop(e); } return false; } var ajaxRules = { ''.ajaxLink'' : function(myAnchor) { // ... code to set up Ajax is up here (removed for simplicity) // put an event handler. Event.stopObserving(myAnchor, ''click'', loadData, false); } }; Behaviour.register(ajaxRules); ******************************************************* Any idea what I''m doing wrong? Thanks in advance.
2005 Aug 31
0
Event listener problems
I''ve been using the bindAsEventListener function and registering various events I want to monitor and have had some problems which might be of interest. First I have been having a crash on Safari 2.0 and 2.0.1. The logical place to call Event.stopObserving to de-register the listener is actually within the listener once it has finished its task. eg register a mouseup listener from the mousedown event listener and then remove the mouseup listener from within the mouseup listener when the mouseup has executed. I found that if Event.stopObs...
2006 Nov 04
0
Prototype observe issues
...le to remove the observer when I make a call to RedBox plugin which opens up a form. I can do this in safari no problem when using the following code: <%= link_to_remote_redbox ''Click Here'', {:url => my_url_path (@object), :method => :get, :loading => "Event.stopObserving (document,''keypress'', Myapp. myObserver);"} %> And I reset the observer if I click on the close link without submitting the form without a problem at all. But again firefox hates this. Lastly I can''t figure out how to send a variable to my custom funct...
2007 Nov 30
2
make sortable divs and innerHTML
My problem is that elements that were included in my site with innerHTML can´t be sortable because the DOM doesn´t know that these elements are there. Has anybody a solution or an idea to this problem? ToM --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group,
2006 Oct 20
1
Event.observe vs. element.onxxx =
...; In my code I''ve made a habit of using the equivalent (for example): this.onSubmitListener = this.onSubmit.bind(this); Event.observe(this.form,''submit'',this.onSubmitListener); So that in my "dispose" methods I can cleanup properly by calling: Event.stopObserving(this.form,''submit'',this.onSubmitListener); Am I just wasting my time? Is the Prototype method more or less leak-prone than the .onxxx = function method? Thanks, Colin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed...
2006 Feb 09
3
Draggables and Droppable performance (tips)
...oved, so you need to handle this condition in your objects. this.createDraggableListener = function() { this.draggable = new Draggable($("someElement"), {...options...} ); //remove this listener once the draggable has been created (no longer needed) Event.stopObserving($("someElement"), "mouseover", this.createDraggableListener); this.createDraggableListener = null; }; Event.observe($("someElement"), "mouseover", this.createDraggableListener); DROPPABLE LAZY LOADING... This is much more complicated, a...