473,651 Members | 3,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

prototype.js bindAsEventList ener without 'this'

I would like to set up an event observer outside of an object, so I
can't use this.bindAsEven tListener. How can I pass the correct object
reference?

I tried something like this, and various other variations, but no luck.
This works when I set it up from inside the object, using "this.",

Event.observe(t argetId,'click' ,targetId.selec t.bindAsEventLi stener(this),fa lse);

Jun 5 '06 #1
28 2625
Diodeus said the following on 6/5/2006 4:45 PM:
I would like to set up an event observer outside of an object, so I
can't use this.bindAsEven tListener. How can I pass the correct object
reference?


What are you referring to? Do not assume the subject line can be, or
even is, read.

Try asking the author of that crap known as prototype.js about the code.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 5 '06 #2

Yeah, maybe his crappy reply will be more helpful than your null
content one.

Randy Webb wrote:
Diodeus said the following on 6/5/2006 4:45 PM:
I would like to set up an event observer outside of an object, so I
can't use this.bindAsEven tListener. How can I pass the correct object
reference?


What are you referring to? Do not assume the subject line can be, or
even is, read.

Try asking the author of that crap known as prototype.js about the code.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


Jun 5 '06 #3
Diodeus said the following on 6/5/2006 7:07 PM:
Yeah, maybe his crappy reply will be more helpful than your null
content one.


See? You learned something new today.

You use code written by an idiot and then you want someone in this group
to wade through all that code written by an idiot to tell you how to
extend that code written by an idiot and then don't like it when they
tell you to ask the author of that code written by an idiot?

P.S. Did I mention that prototype.js is code written by an idiot?

This is Usenet, not your help desk.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 5 '06 #4
Randy Webb <Hi************ @aol.com> writes:
P.S. Did I mention that prototype.js is code written by an idiot?


Your opinion, which you are entitled to, could be presented more
diplomatically (which would also increase the chance of it being
received and considered). I assume that is the goal of your posting
it. If it isn't, have you considered simply not answering questions
about prototype.js? I bet it would be better for your blood pressure
as well :)

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jun 5 '06 #5
Randy Webb wrote:
Diodeus said the following on 6/5/2006 7:07 PM:
Yeah, maybe his crappy reply will be more helpful than your null
content one.

See? You learned something new today.

You use code written by an idiot and then you want someone in this group
to wade through all that code written by an idiot to tell you how to
extend that code written by an idiot and then don't like it when they
tell you to ask the author of that code written by an idiot?

P.S. Did I mention that prototype.js is code written by an idiot?

Come on Randy, don't beat about the bush, if you've got something to
say, say it!

--
Ian Collins.
Jun 5 '06 #6
> > Diodeus said the following on 6/5/2006 4:45 PM:
I would like to set up an event observer outside of an object, so I
can't use this.bindAsEven tListener. How can I pass the correct object
reference?


Diodeus,

You fell into a trap. A particularly rude one unfortunately.

You will have better luck with Prototype.js questions on the rails
spinoffs list

http://lists.rubyonrails.org/mailman...rails-spinoffs

Search the archives here to find out why people don't like
prototype.js.

http://www.javascripttoolbox.com/bes....php#prototype

An better alternative is the Yahoo! UI

http://developer.yahoo.com/yui/

Peter

Jun 6 '06 #7
Lasse Reichstein Nielsen said the following on 6/5/2006 7:25 PM:
Randy Webb <Hi************ @aol.com> writes:
P.S. Did I mention that prototype.js is code written by an idiot?


Your opinion, which you are entitled to, could be presented more
diplomatically (which would also increase the chance of it being
received and considered).


In the future, I will endeavor to call them people lacking professional
skill rather than use the word that describes them. Fair enough?

<URL: http://en.wikipedia.or g/wiki/Idiot>
person lacking professional skill

Anybody that would write something that is as advanced and complex as
prototype is and not comment it, support it, or in any way (that I have
seen to date), try to explain how to use it, what better - more
diplomatic - word is there to describe it?

Many people in this group - and elsewhere - get annoyed when certain
words are used simply because they don't know what the word really means.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 6 '06 #8
Randy Webb wrote:
Lasse Reichstein Nielsen said the following on 6/5/2006 7:25 PM:
Randy Webb <Hi************ @aol.com> writes:
P.S. Did I mention that prototype.js is code written by an idiot?


Your opinion, which you are entitled to, could be presented more
diplomatically (which would also increase the chance of it being
received and considered).


In the future, I will endeavor to call them people lacking professional
skill rather than use the word that describes them. Fair enough?

<URL: http://en.wikipedia.or g/wiki/Idiot>
person lacking professional skill

Anybody that would write something that is as advanced and complex as
prototype is and not comment it, support it, or in any way (that I have
seen to date), try to explain how to use it, what better - more
diplomatic - word is there to describe it?


I doubt the author of Prototype.js forced his code on anyone. He
probably uses it himself and it was nice of him to say to the world
something like "here is my experiment with JavaScript, if you want to
figure it out and use it, go for it." That is a generous contribution
even if the code is not to your liking. Likely it is good to look at
JavaScript through Ruby eyes just for a different perspective on the
JavaScript language. I think you are being a little harsh on the
author.

If someone decides to use Prototype.js in their project and has no
problems then maybe it is good for them. It could bite them later but
maybe it won't. Some projects just won't use the parts of Prototype.js
that might cause problems.

Peter

Jun 6 '06 #9
Randy Webb wrote:
Lasse Reichstein Nielsen said the following on 6/5/2006 7:25 PM:
Randy Webb <Hi************ @aol.com> writes:
P.S. Did I mention that prototype.js is code written by an idiot?

[snip]
Many people in this group - and elsewhere - get annoyed when certain
words are used simply because they don't know what the word really means.


According to my Concise Oxford Dictionary the word "idiot" currently has
two meaning: person so deficient in mind as to be permanently incapable
of rational conduct; and, utter fool. In modern English usage it does
not mean "a person lacking in professional skills" (which it may have
2,400 years ago in a different culture.)

Andrew Poulos
Jun 6 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
12176
by: Web Developer | last post by:
Hi, Comming from Java, it seems that prototype declarations are like abstract methods. I have not read classes in C++ yet, but prototype declarations are a strange concept. Any comments appreciated. WD
2
3024
by: stephane | last post by:
Hi all, What I am trying to achieve is an 'inherits' method similar to Douglas Crockford's (http://www.crockford.com/javascript/inheritance.html) but that can enable access to the superclass' priviledged methods also. Do you know if this is possible ? In the following example, I create an ObjectA (variable a), an ObjectB which inherits ObjectA (variable b) and an ObjectC which inherits ObjectA (variable c1). The 'toString ()' method...
14
5553
by: Mantorok Redgormor | last post by:
Would this by any chance invoke undefined behavior? extern int printf(const char *, ...); int main(void) { printf("Hello\n"); return 0; } That is, providing my own printf prototype would invoke undefined behavior in anyway? Assuming the implementation is c89 of course.
21
3835
by: Rob Somers | last post by:
Hey people, I read a good thread on here regarding the reason why we use function prototypes, and it answered most of my questions, but I wanted to double check on a couple of things, as I am writing something up on functions, and I don't like writing about things I am not sure about. Ok, then, here we go: I initially thought that one would only really need to use a function
12
2191
by: petermichaux | last post by:
Hi, I've been reading the recent posts and older archives of comp.lang.javascript and am surprised by the sentiments expressed about the prototype.js library for a few reasons: 1) The library has been referred to as "junk" many times which is a strong opinion against the relatively high popularity of the library. I know popularity doesn't make something good.
45
3005
by: bigdadro | last post by:
I've created a new class using prototype.js. After I make the ajax.request all references to this.myClassMethodorVariable are lost. Does the ajax method blow out the object persistance? I'm fairly new to OOP javascript so could be (and probably am) overlooking some detail. Below is the logic of what i'm trying to do. //Javascript code var myClass = Class.create(); myClass.prototype={ initialize: function(fm) {
4
2085
by: reggiestyles | last post by:
Hi, I've got a question about prototype and event handling. I've got several div's (dynamic number) on a page that I want to set as active or inactive (basically, I'm using scriptaculous' Effects to set Opacity to 1 for the active div and 0.5 for the inactive ones). Using prototype's event handling, I can see two ways to get this done:
4
10374
by: danf | last post by:
Can anyone tell me what the difference is between these two protoype methods? They are extensions of Javascript's Function class. Is bindAsEventListener just used to be compatible with IE's Event model? I'm thinking the only difference between the 2 methods is that bindAsEventListener passes the event into the function. I want to know how I can practically apply these.
1
2519
by: tdan | last post by:
I do not know how to get Event.stopObserving() to work in the context I am using it. I am displaying a Color Selection Table and attaching 2 events: 1. onmouseover to display the color to the user 2. onmouseup to select the color and hide the Table The onmouseup event should also call Event.stopObserving() so that mouse clicks are no longer being observed. An alert is shown when the mouse is clicked indicating the event handler is...
0
8357
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8277
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8803
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8465
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7298
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1910
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.