similar to: event.keyCode broken in prototype?

Displaying 20 results from an estimated 10000 matches similar to: "event.keyCode broken in prototype?"

2007 Jul 16
4
Problem with keypress event handling
Hi all, we are writing a cross browser Javascript control that enhances the HTML text input element in order to accept only digits (more or less). Supposing that ''domText'' is the DOM element corresponding to the HTML text input, we wrote the following: Event.observe(domText, "keypress", this.onKeyPress.bindAsEventListener(this)); where this.onKeyPress =
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 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 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:
2006 Feb 13
2
[PATCH] Allow generic autocompleter (Ajax.Watcher)
Hey. Below is a patch to allow generic Ajax.Autocompleters. Basically it''s for people who wanna be able to watch an input for changes, but don''t want it to pop up an autocompleter box below. Useful for live previews, that kind of thing. Someone''s gonna have to fix the tabstops. I couldn''t be arse to work out how to make vim do the softtabs properly. Spaces for
2006 Jun 15
4
Yahoo!-like Event object emulation/abstraction in Prototype?
Hi, I was reading about the Yahoo! library recently and was really excited by the idea that I wouldn''t have to branch for IE in my event handlers. Is there any chance that such abstraction will come to Prototype? Thanks, Sam
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 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 Mar 22
4
Capture/Observer keys (F11, F3, ALT+arrows, CTRL+C/V/X)
Hi all, I really appreciate all of you who are behind this great proyect. Im from Argentina (if you dont notice for my accent eheheh) Im trying to capture width the func Event.observe() the keys F3 and F11. Also the combinations for ALT and the arrows keys, and other combinations like: CTRL+X (cut) CTRL+C (copy) CTRL+V (paste) Using something like this: Code: Event.observe(window, keycode=122,
2006 Jan 16
8
resizable window/div - some help needed
Hello I have been working on a little window dialog script - please see <http://net4visions.com/dev/window/window.htm> http://net4visions.com/dev/window/window.htm for a preview. the necessary files can be downloaded here: <http://net4visions.com/dev/window/window.zip> http://net4visions.com/dev/window/window.zip .I''ve included just the basics - please change the path in
2006 Aug 31
2
Event.observe problem
Hi everyone! I came across and interesting problem with prototype Event.observe. Take this code for example: <script type="text/javascript" src="cropper/lib/prototype.js"></script> <script language="JavaScript"><!-- function handler(e) { if (document.all) { e = window.event; } var key; if (document.layers) key = e.which; if
2006 Mar 08
4
Event.Observer - (was: Ajax.Autompleter not working on IE)
See if I can stir up a little life with a demo. I can''t believe that Ajax.Autocomplete doesn''t work on IE, so I *must* be doing something wrong. Trying to figure this out I added some alerts to control.js and it seems that IE is not getting the onkeypress events. So, here''s a demo: http://hank.org/demos/form.html That contains two fields with onkeypress events:
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 17
6
Updated the xml code to be more object-oriented
I changed the code to be more prototype-esque, and created a class called XMLDoc. I may add more functionality to it later, hence the more generic name, but you do something like this to convert XML to a hash: XMLDoc = Class.create(); Object.extend(XMLDoc.prototype, { initialize: function (xmlDoc) { this.element = xmlDoc; }, asHash: function () { if (! this._xmlHash) {
2006 Jan 18
8
BlindDown on a div with overflow: auto...
I have a div with overflow: auto... BlindUp works fine. But BlindDown simply waits the duration and shows the div at full size (no blinding down effect). If I remove overflow: auto it works fine. Why would this work for BlindUp but not BlindDown? Sincerely, Ryan Gahl Design Engineer Camtronics Medical Systems (an Emageon Company) Ryan.gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org
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 17
7
Released: window dialog script
Hello, First, please let me thank you to Ryan Gahl and Jerod Venema for their patient help - really appreciated their input - I couldn''t have done this script without their support. Today I released a dialog script based on scriptaculous and prototype. A demo can be seen here: http://net4visions.com/dev/dialog/dialog.htm . Please see the readme and changelog file for details. Your
2006 Jan 12
6
Draggable performance issues
Using the script.aculo.us Draggables, I''m noticing they are a bit less than fast. I drag them around on the screen and they jump and glitch to catch up with the mouse. Has anyone else noticed this, and are there any optimizations that have been identified that I can apply? I''m using v. 1.5 Sincerely, Ryan Gahl Design Engineer Camtronics Medical Systems (an Emageon
2006 Feb 27
30
Calendar widget
Has anyone made, or does anyone know of, a nice calendar control based on prototype/scriptaculous out there yet? Thanks in advance! Sincerely, Ryan Gahl Design Engineer Camtronics Medical Systems (an Emageon Company) Ryan.gahl-nlycWCgr5/vuufBYgWm87A@public.gmane.org 262-369-3251 The information transmitted in this electronic mail is intended only for the person or entity to which it
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();