Hello Larry,
First of all how did you find this mailing list? You haven't used a single
Prototype method in your code?
You might want to have a look at the following sections:
Creating elements (and adding attributes at the same time):
http://api.prototypejs.org/dom/Element/new/
Or adding
Have you ever considered not including the initialize method in the
subclass?
Perhaps your baseclass can check if there's a child 'constructor' present
and automatically call that:
var MySuper = Class.create({
initialize: function() {
// do stuff
if (this.childConstructor) {
I've recently seen this aswell, I don't know why it's in but I guess it's to
support IE6 or something.
I simply created the element and then used writeAttribute('name', myname');
to add the name attribute.
Although I am curious why this is.
On Tue, Sep 27, 2011 at 12:55 PM, Dave Kibble
http://madrobby.github.com/scriptaculous/sortable/
Doubt it, but have you tried 'snap' from the Draggable options?
On Mon, Sep 26, 2011 at 2:47 PM, T.J. Crowder t...@crowdersoftware.comwrote:
On Sep 26, 10:18 am, Vaji vajiram...@gmail.com wrote:
Any timely help would be much more
to your DOM init and invoke it.
Eric
On Aug 23, 10:04 am, Johan Arensman johanm...@gmail.com wrote:
Hey guys,
I'm redesigning a template set for different kind of websites. In the
past
quite a lot of 'widgets' have been created in the form of prototype
Classes
and almost every widget works
Hey guys,
I'm redesigning a template set for different kind of websites. In the past
quite a lot of 'widgets' have been created in the form of prototype Classes
and almost every widget works the same way:
1. get all elements with className 'x'
2. for each element: create a new ClassX
3. ClassX
This is because your newImg is not an extended element.
Create a new img element using:
new Element('img');
or use the prototype dollar function (http://api.prototypejs.org/dom/dollar/)
to properly extend your element with the prototype methods:
$(newImg);
Your addImage method could be
TJ! How on earth can you do that so fast!?
Do you have this reply as a template or something??
On Wed, Jun 29, 2011 at 10:31 AM, T.J. Crowder t...@crowdersoftware.comwrote:
Hi,
On IE, Prototype can't extend elements at the prototype level and so
you have to extend them individually if you
plenty more functionality in the framework than only the Class
object.
On Tue, May 31, 2011 at 4:35 PM, maven apache apachemav...@gmail.comwrote:
2011/5/31 Johan Arensman johanm...@gmail.com
Hi,
Mostly because with Class.create() you can make use of the various
inheritance functionality
Hi,
Mostly because with Class.create() you can make use of the various
inheritance functionality in the Prototype framework.
See http://api.prototypejs.org/language/Class/create/ for more information.
Greetings,
Johan
On Tue, May 31, 2011 at 3:26 PM, maven apache apachemav...@gmail.comwrote:
by the child. Is that true or do you know any way to
access it from the child? $super just seems to contain the parent's
method that has the same name like the child's method it is passed
to... .
On Nov 29, 1:23 pm, Johan Arensman johanm...@gmail.com wrote:
You can use the $super
http://api.prototypejs.org/dom/Event/observe/
http://api.prototypejs.org/dom/Event/observe/ Changes in 1.6.x
Prior to Prototype 1.6,
Event.observehttp://api.prototypejs.org/dom/Event/observe/ supported
a fourth argument (useCapture), a boolean that indicated whether to use the
browser's
You can use the $super parameter name to access the property of the parent
class.
See: http://api.prototypejs.org/language/Class/create/
On Mon, Nov 29, 2010 at 12:15 PM, Luke kickingje...@gmail.com wrote:
Hi there!
Is there a way you can inherit from a class and extend a property from
the
findAll is your filter function. The result from findAll can be iterated
using each but I think we really need more information such as a
datastructure to actually help you with your problem.
Greets,
Johan
On Fri, Sep 17, 2010 at 6:15 AM, kstubs kst...@gmail.com wrote:
How do you chain
...@gmail.com wrote:
On 4 September 2010 07:54, Johan Arensman johanm...@gmail.com wrote:
Feature checking is usually done by checking for a specific method or
attribute on the object.
For a template you can check for the evaluate method:
if(MyObject.evaluate) {
// it's a template
Feature checking is usually done by checking for a specific method or
attribute on the object.
For a template you can check for the evaluate method:
if(MyObject.evaluate) {
// it's a template
}
On Wed, Sep 1, 2010 at 5:20 PM, Richard Quadling rquadl...@gmail.comwrote:
Hi.
I can't find a
Also you cannot use the class keyword because it's reserved in javascript,
you'll have to use className or 'class' between quotes in the objectliteral.
There is a known bug in IE8 with creating elements with for example the
Element constructor. In this case adding the classname with
Hello,
Why not do exactly what you say, compose all the parameters for the request
and execute whenever you want:
var url = '/foo.php';
var ajaxOptions = {
option1: foo,
option2: bar
}
// do whatever you want..
// even add something
ajaxOptions.option3 = 'bla';
// then execute
new
Hey,
Setting styles can be done using the the setStyle method:
http://api.prototypejs.org/dom/element/setstyle/
Selecting elements using a css selector can be done using the $$ method
which is short for Element.select() but then global:
http://api.prototypejs.org/language/dollardollar/
Bah T.J!
You beat me to it!
:-)
On Tue, Aug 31, 2010 at 4:39 PM, T.J. Crowder t...@crowdersoftware.comwrote:
Hi,
Hope you enjoy Prototype!
The Prototype equivalent of jQuery's `$` function is `$$` (yes,
really):
http://api.prototypejs.org/language/dollardollar/
The Prototype
I'm fully against marquee's in the first place but you also have an option
to add the attribute data-duration to your element. If you're making a class
to replace a depricated functionality you shouldn't use this way to add
features or configuration to it.
I've also done it before (the client
You are trying to apply a single method to a set of items. For this to work
you need to apply the same function to each member of the set using
invoke().
$$('input.compare_itm').invoke('observe', 'click', myFunction);
See also: http://api.prototypejs.org/language/enumerable/prototype/invoke/
Indeed T.J. catching bubbling events is something I need to consider more
often.
Thanks for the heads up :-)
On Mon, Aug 23, 2010 at 10:05 AM, T.J. Crowder t...@crowdersoftware.comwrote:
Hi,
The $$ function returns an array[1]. Arrays don't have an `observe`
method. However, Prototype does
You could also try to observe the form and prevent it from submitting:
YourFormElement.observe('submit', function submitEvent(event) {
event.stop(); // stops the form from actually submitting
// other code you would like to run
});
On Mon, Aug 23, 2010 at 10:24 AM, jhaagmans
I'm no RSH expert, but i really think you should ask this at the RSH group.
It's no prototype based application, it only uses prototype for serializing
JSON strings as far as i can see.
Have you tried any of the examples given at :
http://code.google.com/p/reallysimplehistory/w/list ?
Greets,
Setting styles can be done using setStyle();
var layout = $('myelement').getLayout();
$('myelement').setStyle({left: layout.get('left')+10});
Is this what you're looking for?
Greets,
Johan
On Fri, Aug 13, 2010 at 12:48 PM, dinoD kapau...@gmail.com wrote:
I'm fooling around with
Sorry, forgot to add 'px' to the value:
var layout = $('myelement').getLayout();
$('myelement').setStyle({left: layout.get('left')+10+'px'});
On Fri, Aug 13, 2010 at 2:08 PM, Johan Arensman johanm...@gmail.com wrote:
Setting styles can be done using setStyle();
var layout = $('myelement
can create the entire element and child elements without any problems.
You can even update() it, and addClassNames() if you want. Just realize that
trying to find it's ancestor will fail when you haven't insert()ed it.
Greetings,
Johan Arensman
On Tue, Jun 15, 2010 at 12:34 PM, Ran Berenfeld
You can using Event.observe()
Event.observe(window, 'contextmenu', function(event) {
event.stop();
});
On Sat, Jun 5, 2010 at 6:29 AM, ankit.it09 ankit.i...@gmail.com wrote:
How to disable right click in a web page using prototype , i mean is
there any method.
Thanks
Ankit
--
You
Hi,
There is no such object it's only some sort of property every object has and
it's used to extend the native objects existing in Javascript.
If you want to learn more about this check this page:
http://www.prototypejs.org/learn/extensions
Greets,
Johan
On Sat, Jun 5, 2010 at 6:16 AM,
You could try 'try/catching' the code:
replace your menu.absolutize(); with:
try {
menu.absolutize();
} catch(e) { alert(e); }
What does the error message tell you?
On Tue, Jun 1, 2010 at 11:12 AM, Ran Berenfeld berenfeld...@gmail.comwrote:
Hello
I'm trying Prototype 1.7 RC 2 and I have a
Consultant
tj / crowder software / com
www.crowdersoftware.com
On Jun 1, 11:15 am, Ran Berenfeld berenfeld...@gmail.com wrote:
It says Object Error
On Tue, Jun 1, 2010 at 12:34 PM, Johan Arensman johanm...@gmail.com
wrote:
You could try 'try/catching' the code:
replace your
Hello,
I believe this is possible by first creating a reference to the element,
extending it and then modifying it:
// get the element and extend it with prototype's $() method:
var element = $(top.document.getElementById('my_element'));
// now apply the effect to the element:
new
33 matches
Mail list logo