Displaying 20 results from an estimated 600 matches similar to: "Reset events after ajax update"
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
2007 Aug 16
4
prototype: Event.observe 'click' for $$('a.popout')
Hi all first time im posting here, hope what i''ve written is clear.
I''m trying to make a popup work using event.observe for all anchor
tags with the CSS selector ''popup''.
in the HTML i have this:
< a href="somelink.php" class="popup">Click to go someplace </a>
in my javascript I have a:
Event.observe(window,
2007 Jul 11
2
RWeka control parameters classifiers interface
Hello,
I have some trouble in achieving the desired parametrisation
for the weka classifier functions, using the package RWeka.
The problem is, that the functions
result=classifier(formula, data, subset, na.action, control = Weka_control(mycontrol))
do not seem to be manipulated by the mycontrol- arguments
Perhaps this should be resepected via the handlers- argument ,
but the
2006 Feb 27
3
bindAsEventListener with parameters
I would like to share a modification to bindAsEventListener() that
might be useful to some of you. It makes it possible to do
function show(event, number) {
alert(Event.element(event).id + " = " + number);
}
Event.observe("el1", "click", show.bindAsEventListener(this, 5);
Event.observe("el2", "click", show.bindAsEventListener(this, 10);
That
2006 Mar 03
11
event.keyCode broken in prototype?
I ran 2 tests. One using proto''s Event.observe, and another using an
in-line handler of the "keydown" event in a textbox.
Using .bindAsEventListener, the event.keyCode is always returning a
capital letter, no matter what. The in-line event handler returns
lowercase vs. uppercase correctly... What''s going on?
I guess I find it hard to believe no one has tried
2006 Jun 19
2
Autocompleter enhancement feature request
Hello,
I have created a ticket for an enhancement of the autocompleter to show the
options immediately when the field gets focus. Right now at least one
character must be typed for autocomplete to kick in.
http://dev.rubyonrails.org/ticket/5435
I have also made some code changes directly in the script
Event.observe(this.element, "blur", this.onBlur.bindAsEventListener(this));
2006 Feb 02
8
this pointer in Event.observe function
Hello,
please consider the following code example. It applies the onclick handler to
all image tags, and through window.event it ensures that it works in IE too:
--------------------------------------------------
var imgs = $(''foo'').getElementsByTagName(''img'');
for(var i=0; i<imgs.length; i++) {
// Apply onclick handler
imgs[i].onclick=function() {
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 03
3
embedding a forum inside a rails app
what is the best way to embed a forum (phpbb is currently installed under
/public/forums/) inside my layout ? I dont want the foum to be its own page
i would like it to appear inside the main part of the page with navigation
and border in tact. is this possible with the current way it is installed ?
thanks
adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Jun 15
3
RE: Yahoo!-like Eventobjectemulation/abstractioninPrototype?
This is obviously rough draft and not thoroughly tested, but it seems to
work. If you''d like, give it a try (load it after you load
prototype.js):
Function.prototype.bindAsEventListener = function(object) {
var __method = this;
return function(event) {
return __method.call(object, new SuperEvent(event || window.event));
}
}
var SuperEvent = Class.create();
2006 Jun 15
10
RE: Yahoo!-like Event object emulation/abstractioninPrototype?
If that doesn''t work, then you''ve done something wrong somewhere.
''Cause it works for IE for me and everyone else.
The only advantage I see with the YUI toolkit is that it''ll defer
attaching events to elements that do not yet exist in the DOM. Big
whoop, only a sloppy programmer would try to attach an event to a
non-existant element. With Prototype, you can
2006 Feb 10
13
Element.observe () binding
Hey all,
I working on a project, but I am not sure I can do what I want to
do. The following works beautifully:
Event.observe(el, ''click'', function () { this.className += "
myClass"; return false; });
I have also tried doing this:
this.varname = ''test'';
Event.observe(el, ''click'', function () { alert (this.varname); }.bind
2006 Apr 29
4
Event.observe mystery
Hi,
I have a class ''Menu'' with a method ''addItem''. The method (simplified)
looks like this:
addItem: function(itemId, text)
{
this.container.innerHTML += ''<div id="''+itemId+''">''+text+''</div>'';
Event.observe(itemId, ''mouseover'',
2006 Jun 15
3
RE: Yahoo!-like Event object emulation/abstractionin Prototype?
Event.observe(myelement, ''click'', myfunc.bindAsEventListener());
That might fix your wagon.
Greg
> -----Original Message-----
> From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
[mailto:rails-spinoffs-
> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Sam Rowe
> Sent: Thursday, June 15, 2006 11:24 AM
> To:
2008 Mar 05
6
Prototype Observe Links (Mouseover)
Hi all,
I''am new to Prototype and after a 2 hours of research I didn''t find a
solution for the following question:
I have the following list:
<ul id="navi">
<li><a href="/about/">Home</a></li>
<li><a href="/about/" class="dropdown"
onmouseover="showSubnavi(this)">About</a>
2006 May 09
5
anyone used the new firefox leak monitor?
One of the Mozilla developer released a new extension to detect JS
memory leaks:
https://addons.mozilla.org/firefox/2490/
If it''s accurate, it might be bad news for Prototype. I have some code
using prototype 1.4 with no leaks, but other code with 1.5 leaks on
every single bindAsEventListener call, and a bunch of other places. Not
sure if it''s just me; I may just be
2006 Mar 16
3
This is driving me crazy!!!
I have the following code but it keeps on giving me this error when it
runs.
--- Error: this.alertBox has no properties
What would be causing this? My Code checks out when I call
this.alertBox() from the setup function it works fine but when I try and
put in on an event observer it doesn''t work.
What do you guys think?
Thanks,
Jon
Code Here:
var Updater =
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.
2007 Mar 23
7
Lightbox-eske Dialogish Object
So, one of the things I''ve always wanted to do was expand upon the
simplicity of the Lightbox Gone Wild! object that the coders at
www.particletree.com put together months ago. I used it on an
application I wrote to organize my own picture albums on my localhost
web server, but I had to hack it apart to get it to do the things I
wanted it to do. I looked at the Prototype Window
2006 Mar 02
3
Hey How did they do that?
I''ve seen web apps where cells within a table column can be highlighted by
dragging over them. NumSum does this. Any ideas on how this is achieved?
When I try to select cells in a column by dragging over them the text within
rows gets selected as well.
Take Care
--
Aneesha
_______________________________________________
Rails-spinoffs mailing list