Displaying 20 results from an estimated 4000 matches similar to: "Making an unload event work with prototype"
2006 Jan 18
2
Event.stopObserving and anonymous functions
Hi all,
I'm using behaviour(.js) to add event handlers to all 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
2006 Feb 01
2
IE memory fix leak.
By default the prototype.js gives us the function
/* prevent memory leaks in IE */
Event.observe(window, ''unload'', Event.unloadCache, false);
But there is no unload event in out application as the content of the div
keeps changing using the Ajax.Updater function. To handle such a scenario,
we''ve added the following lines of code to prototype.js
/* prevent
2006 Feb 10
0
Behaviour.js and prototype Event.observe
say I have some code like this:
Behaviour.register({
''#clickme'' : function(el) {
Event.observe(el, ''click'', function(event) {
alert("clickme was clicked");
});
}
});
Behaviour.apply();
Behaviour.apply();
the element with the id of ''clickme'' will now have 3 onclick event observers.
Is there a way to work around this?
I
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, send email to
2006 Nov 04
0
Prototype observe issues
I have tried a couple of different ways to do the following (using
unobtrusive javascript) as well as straight javascript. So far the
only way that I have been able to get it to work is through straight
javascript but still is not working the way that I would hope.
Basically I have the following in my application.js
var Myapp = {
myObserver: function(event) {
// links to adding a new
2006 Mar 04
1
RE: Question about event listener highlighting withchild elements
1. Create a separate class that has your highlight/unhighlight behavior
in it, and extend just the element you want to highlight with that
class... like this (also allows you to easily apply this behavior
elsewhere when you need it in the future):
Object.extend(this.el, HighlightBehaviorClass.prototype)
2. When defining your event handlers, assign them to variables so you
have a
2006 Mar 04
0
Question about event listener highlighting with child elements
I have created a JavaScript object which is initialized for some input
fields, fieldsets, and divs on the page. With each object i attach a
mouseover and mouseout event that highlights and un-highlights. Also on
mouseout i am trying to display the id of the object to a console. The
highlighting works except for cases when an object is the child of another
object. In this case both are highlighted
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.
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
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 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 Dec 14
1
Problem stopping default event in Safari
I''m going crazy here. I''m trying to stop a link from being followed
after it''s clicked. It works everywhere except Safari (using v. 2.0.2
on Tiger)
I''m using behavior.js to attach events based on a class or an id:
*******************************************************
function loadData(e) {
// load some data here based on the url of the a tag
2006 Nov 28
1
observe_form, observe_field, dynamic forms help
I made a pretty lengthy post on what I''m doing here:
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/89a2b8e54a874dd9
Short version:
I have a radio_button group of two. If one is clicked another pair of
radio buttons is added, if the other is clicked it is removed.
observe_form does not work for elements added after initial page load.
observe_field does not work
2006 Jan 11
0
RE: Event.observer - unordered list problems
Hi Marco (I forwarded this also to the mailing list and removed the
picture as it wasn''t necessary to include to the mailing list so
everyone can hear the general techniques),
I recently had a very similar problem with my project. The problem
arises because whenever you move the mouse to ANY element, the previous
element that the mouse was over gets a mouseout event, even if it
2006 Jan 11
0
RE: RE: Event.observer - unordered list problems
I just realized I made a mistake... in the first numbered solution, the
!= should be ==
________________________________
From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
[mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Ryan
Gahl
Sent: Wednesday, January 11, 2006 2:28 PM
To:
2006 Oct 20
1
Event.observe vs. element.onxxx =
What are the pros and cons of using Event.observe vs. element.onxxx =
somefunction ?
I noticed that a lot of sau code doesn''t use Event.observe. For example,
InPlaceEditor uses
this.form.onsubmit = this.onSubmit.bind(this);
In my code I''ve made a habit of using the equivalent (for example):
this.onSubmitListener = this.onSubmit.bind(this);
2006 Feb 09
3
Draggables and Droppable performance (tips)
Hi all. I have some performance tips to share. I had been having
problems with the overall performance of the drag/drop objects. This is
due largely to the fact that my project really pushes the limits
(potentially thousands of draggables and hundreds of droppables in the
document at a time, although that is the extreme case).
Something I discovered is that the performance of dragging goes WAY
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,
2007 Apr 17
4
close a div when click out of the div
Hi. I have this question: I have a page with more ugual "GIF" (say ?/Help
gif). When I click on one of this giv a "DIV" is showed (one for each gif).
And when a div is showed the last div "showed" there must "hide". Ok, no
problem. I have do it. My problem is that the div that is showed in this
moment must to "hide" when I clink into the document
2005 Nov 19
16
Looking to develop for scriptaculous
Hello All,
I have just joined rails-spinoffs mailing lists and I would like to
introduce myself. My name is Casey and I am a professional Web and
J2EE developer currently working out of New York. I am very
interested in contributing to the Scriptaculous javascript library.
For the past few months I have been using certain functions in the
library and I have to say that it has taken my