[Proto-Scripty] How to use event delegation for mouseenter/mouseleave events?

2009-11-26 Thread szimek
Hi,

anyone had any luck with using event delegation for mouseenter and
mouseleave events? I'm constantly adding and removing elements from
the page, so it would be much better and easier than keeping track of
all handlers manually.

Cheers,
Szymon

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




[Proto-Scripty] Re: prototype 1.6.1, IE6: Object doesn't support this property or method, typeof Element=unknown

2009-11-26 Thread Carsten
 Are you certain that the object has actually been created in the DOM
 when you call this?

Element is the Element-object from the prototype library. The
library has been included and other objects like Ajax are present.

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




[Proto-Scripty] Re: prototype 1.6.1, IE6: Object doesn't support this property or method, typeof Element=unknown

2009-11-26 Thread Carsten
 Are you certain that the object has actually been created in the DOM
 when you call this?

Element is the Element-object from the prototype library. The
library has been included and other objects like Ajax are present.

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] How to use event delegation for mouseenter/mouseleave events?

2009-11-26 Thread Peter De Berdt

On 26 Nov 2009, at 11:48, szimek wrote:

 anyone had any luck with using event delegation for mouseenter and
 mouseleave events? I'm constantly adding and removing elements from
 the page, so it would be much better and easier than keeping track of
 all handlers manually.

For global handlers, we use NWEvents and NWMatcher 
(http://javascript.nwbox.com/NWEvents/ 
). For the actual behavior implementation, we still use Prototype 
+Scripty. Amazing combo, really...


Best regards

Peter De Berdt

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




[Proto-Scripty] Re: Attempting to extend a prototype method

2009-11-26 Thread david
Hi Hippyjim Starbrook,

this is not the way you should do. It's better to use a wrapper to t
(he native function. First because you did not modify the standard
behaviour of prototype, and also because you still have the capability
to call the original function.
Have a look to the wrap() function at
http://api.prototypejs.org/language/function.html#wrap-instance_method

In you case, you could do something like that:
  Form.Element.Methods.disable=Form.Element.Methods.disable.wrap(
function(OriginalCall,ExtraParameters){
  //do what you want here,
  //this refer to a Form.Element.Methods object.
...
  //call original method and return it's value if needed.
  return OriginalCall(this);
}
  );

The OriginalCall is the original prototype function you overide. You
can (or of course not) call it.

hope that help.

--
david



On 25 nov, 22:30, Hippyjim Starbrook hippyjim.starbr...@gmail.com
wrote:
 Hi All

 I'm attempting to extend the Form.Element.disable() method, so that it
 adds a disabled class to any element is disables.

 I'm attempting to replace the existing prototype function with one of
 my own, using the following code in a javascript file loaded after
 prototype.js:

 Form.Element.Methods.disable = function(element) {
     element = $(element);
     element.blur();
     element.disabled = true;
     element.addClassName(disabled);
     return element;

 }

 But it doesn't seem to replace the original prototype method.

 Am I missing something?

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




[Proto-Scripty] Re: Scriptaculous adds green color to upper-case fonts

2009-11-26 Thread Kenny


Hi David:

Thanks very much for your replies which I eagerly awaited.
unfortunately
just now I noticed them although I checked every day. Thanks
especially
for checking the page as you have. Using FF3.5.5 I still see green
coloring on
most of the uppercase letters. I'll re-read your suggestions and get
back to you.

Thanks

On Nov 23, 2:53 pm, david david.brill...@gmail.com wrote:
 Hi again,

 I've checked on on another computer, and I see a problem in the menu
 when first overing an element.
 What I see is not a color problem, but an opacity problem.
 Menu element's opacity is not set at page definition, so when the
 first effect appears, scriptaculous set by default opacity to 1. For
 other effects, no problem as the value is set at the element's level.

 --
 david

 On 23 nov, 18:36, david david.brill...@gmail.com wrote:



  Hi Kenny,

  I tested the link with FF3.5 and it works :))
  Which version has this problem ??

  btw, one suggestion is to be sure that the starting color is defined
  in the CSS before the effects start. But default color in
  scriptaculous is white so 

  --
  david

  On 23 nov, 01:48, Kenny kennypres...@gmail.com wrote:

   Hello:

   I'm glad to have found this group as I'm very eager to get
   Sciptaculous working properly. I recently discovered Scriptaculous,
   and I tested version 1.6.4 on a website I built for my friend, using
   body onLoad=appearFromInvisible().  It worked perfectly in IE, but
   in Firefox, upper-case letters (especially of  white fonts) displayed
   half green when they completed fading in. Now that I upgraded to the
   latest version of Scriptaculous 1.8.3, the green color only flashes
   momentarily onto the white fonts just before completeley fading in.
   Are you familiar with this problem? Is there a way to correct it?

   The test page showing the 
   problem:http://www.billyjoeconor.com/home-test.html

   Thanks- Hide quoted text -

 - Show quoted text -

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




[Proto-Scripty] Re: Scriptaculous adds green color to upper-case fonts

2009-11-26 Thread Kenny


On Nov 23, 2:53 pm, david david.brill...@gmail.com wrote:
 Hi again,

 I've checked on on another computer, and I see a problem in the menu
 when first overing an element.
 What I see is not a color problem, but an opacity problem.
 Menu element's opacity is not set at page definition, so when the
 first effect appears, scriptaculous set by default opacity to 1. For
 other effects, no problem as the value is set at the element's level.

 --
 david

 On 23 nov, 18:36, david david.brill...@gmail.com wrote:



  Hi Kenny,

  I tested the link with FF3.5 and it works :))
  Which version has this problem ??

  btw, one suggestion is to be sure that the starting color is defined
  in the CSS before the effects start. But default color in
  scriptaculous is white so 

  --
  david

  On 23 nov, 01:48, Kenny kennypres...@gmail.com wrote:

   Hello:

   I'm glad to have found this group as I'm very eager to get
   Sciptaculous working properly. I recently discovered Scriptaculous,
   and I tested version 1.6.4 on a website I built for my friend, using
   body onLoad=appearFromInvisible().  It worked perfectly in IE, but
   in Firefox, upper-case letters (especially of  white fonts) displayed
   half green when they completed fading in. Now that I upgraded to the
   latest version of Scriptaculous 1.8.3, the green color only flashes
   momentarily onto the white fonts just before completeley fading in.
   Are you familiar with this problem? Is there a way to correct it?

   The test page showing the 
   problem:http://www.billyjoeconor.com/home-test.html

   Thanks- Hide quoted text -

 - Show quoted text -

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




[Proto-Scripty] Re: Scriptaculous adds green color to upper-case fonts

2009-11-26 Thread Kenny


On Nov 23, 2:53 pm, david david.brill...@gmail.com wrote:
 Hi again,

 I've checked on on another computer, and I see a problem in the menu
 when first overing an element.
 What I see is not a color problem, but an opacity problem.
 Menu element's opacity is not set at page definition, so when the
 first effect appears, scriptaculous set by default opacity to 1. For
 other effects, no problem as the value is set at the element's level.

 --
 david

 On 23 nov, 18:36, david david.brill...@gmail.com wrote:



  Hi Kenny,

  I tested the link with FF3.5 and it works :))
  Which version has this problem ??

  btw, one suggestion is to be sure that the starting color is defined
  in the CSS before the effects start. But default color in
  scriptaculous is white so 

  --
  david

  On 23 nov, 01:48, Kenny kennypres...@gmail.com wrote:

   Hello:

   I'm glad to have found this group as I'm very eager to get
   Sciptaculous working properly. I recently discovered Scriptaculous,
   and I tested version 1.6.4 on a website I built for my friend, using
   body onLoad=appearFromInvisible().  It worked perfectly in IE, but
   in Firefox, upper-case letters (especially of  white fonts) displayed
   half green when they completed fading in. Now that I upgraded to the
   latest version of Scriptaculous 1.8.3, the green color only flashes
   momentarily onto the white fonts just before completeley fading in.
   Are you familiar with this problem? Is there a way to correct it?

   The test page showing the 
   problem:http://www.billyjoeconor.com/home-test.html

   Thanks- Hide quoted text -

 - Show quoted text -

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.