similar to: RE: Yahoo!-like Event object emulation/abstractionin Prototype?

Displaying 20 results from an estimated 2000 matches similar to: "RE: Yahoo!-like Event object emulation/abstractionin Prototype?"

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 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 Jun 12
10
Cross Broswer Fire Event
Is there a standard way of programmatically firing an event on an element? I think this code works in IE but not FF: myElement.fireEvent(''onclick''); I really only care about IE and FF, but anything else is a bonus. I didn''t see anything in prototype/scriptaculous for this, but I might have missed it. Thanks. Joe Athman
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 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 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 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
2005 Oct 21
1
{ afterfinish }
Hi, 1. can someone give me an example usage of { afterfinish: }? I tried several ways and just can''t get it. I was trying to deploy an effect after another one had finished and just couldn''t do it. Effect.dropout (myElement, {afterfinish: function(element) { Effect.Appear(anotherElement); } } ); a) why doesn''t this work? b) what''s the element argument for?
2007 Jun 22
2
Waiting For Completion
I am writing an application that will display a series of images. When a link is clicked the images will fade away, and new images will fade in. I am starting by trying to simply fade the images out then back in through a function: function ChangeImage() { Effect.BlindDown(''MyElement'',{duration:0.5}); Effect.BlindUp(''MyElement'',{duration:0.5}); } This
2007 Sep 20
10
Element.addMethods functions swallowing exceptions (IE6 + 7)
IE6 and IE7 are not correctly handling the ''throw'' command for functions attached to Element via Element.addMethods. Firefox and Safari are fine. See the example below. For IE6: functions called with no attributes (ie: funcName()) correctly handle thrown errors. Funcions called with attributes (ie: funcName("foo")) will respond to the throw command and pass execution
2006 Mar 14
3
Returning Javascript
I have a page with some links on it that when clicked, loads a "subpage" in a div. This subpage contains some html and javascript. I see how using ajax.updater with evalscripts will run any standalone javascript on the subpage, but I do not have access to any of the javascript functions on that subpage. Is there some way I can make those javascript functions available to the page?
2006 Mar 31
7
Reset events after ajax update
Avoiding real work I decided to try and clean up my html and remove my inline onclick handlers for Ajax.Updater calls. Here''s the inline method I''ve been using: http://hank.org/demos/ajax-inline.html Now, here''s using <script> sections to apply the behavior. http://hank.org/demos/ajax.html (firefox only) Since the links (tabs) are inside the
2006 Sep 14
10
scriptaculous Toggle Appear rate
I have the following code to toggle a basic appear of a div: <a href="#" onclick="Effect.toggle(''d3'',''appear''); return false;">Toggle appear</a> I want to edit the rate in which the effect runs. I can''t for the life of me figure it out. I would like to make the effect complete faster, like .5 seconds. I''ve
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 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 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 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 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 Mar 30
1
Yahoo! User Interface Library on Rails???
Has anyone tried out the Yahoo! User Interface Library (js) with Rails? How does it compare with prototype & scriptaculous? -- Posted via http://www.ruby-forum.com/.