[Proto-Scripty] Re: Adding properties to all form elements

2008-12-18 Thread Kupido
Unfortunately I need my application to be compatible with IE too... :( What about the initialization function? Object.extend(Form.Methods, { initialize: function (form) { form = $(form); form.property1 = 'test'; form.property2 =

[Proto-Scripty] Re: Adding properties to all form elements

2008-12-19 Thread Kupido
, Kupido kup...@hotmail.com wrote: Unfortunately I need my application to be compatible with IE too... :( What about the initialization function? Object.extend(Form.Methods, { initialize: function (form) { form = $(form

[Proto-Scripty] mouseenter mouseleave: tooltip not hiding

2009-10-30 Thread Kupido
Hi all, I have a page with some boxes placed side by side. When the user moves over one of them a tooltip appears, then it should disappear when the user moves out or moves over another box. I use the mouseenter and mouseleave events to do this but sometimes, when the user moves quickly on the

[Proto-Scripty] Re: mouseenter mouseleave: tooltip not hiding

2009-10-30 Thread Kupido
Kupido, When writting: Event.observe(element, 'mouseenter', mouseEnter.bindAsEventListener (element)); When writting bindAsEventListener, it means that your binded function will have its scope set to element. So your called fiunction should be: function mouseEnter(event

[Proto-Scripty] Re: mouseenter mouseleave: tooltip not hiding

2009-10-30 Thread Kupido
After some testing I noticed the problem only occurs when I use: tooltip.appear(); // scriptaculous effect insted of: tooltip.show(); Any suggestions? On Oct 30, 11:37 am, Kupido kup...@hotmail.com wrote: Hi david, thank you for your reply. The element argument in my previous post

[Proto-Scripty] Re: mouseenter mouseleave: tooltip not hiding

2009-10-30 Thread Kupido
After some testing I noticed the problem only occurs when I use: tooltip.appear(); // scriptaculous effect instead of: tooltip.show(); Any suggestions? On Oct 30, 11:37 am, Kupido kup...@hotmail.com wrote: Hi david, thank you for your reply. The element argument in my previous post

[Proto-Scripty] Re: mouseenter mouseleave: tooltip not hiding

2009-10-30 Thread Kupido
'); tooltip.hide(); } } document.observe('dom:loaded', function () { init(); }); Comments and suggestions are welcome! On Oct 30, 12:18 pm, Kupido kup...@hotmail.com wrote: After some testing I noticed the problem only occurs when I use: tooltip.appear(); // scriptaculous effect

[Proto-Scripty] Re: mouseenter mouseleave: tooltip not hiding

2009-10-30 Thread Kupido
Hi david, I'll consider using fade instead of hide, thank you again for your help! On Oct 30, 1:02 pm, david david.brill...@gmail.com wrote: Hi Kupido, This is a good way to do this. Just a suggestion, if the tooltip appear, let it des-appear sloowly too. so don't just hide() it, but do

[Proto-Scripty] Execute a function after another one

2010-09-22 Thread Kupido
Hello, I'm looking for a reliable way to call a function after the previous one has completed. I'm not new to Prototype but I can't find a way to call n functions sequentially... is Function.defer meant for this? Thanks in advance. -- You received this message because you are subscribed to

[Proto-Scripty] Re: Execute a function after another one

2010-09-22 Thread Kupido
What if the first function takes some time to complete and for some reason I can't chain the methods? Suppose we have an hidden form and we want to display it and do something with it (such as setting the focus to the first field or even something more complex): $('my-form').appear();

[Proto-Scripty] Re: Execute a function after another one

2010-09-22 Thread Kupido
Note that the function calls in my example are not asynchronous and there's no AJAX involved. -- 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

[Proto-Scripty] Re: Execute a function after another one

2010-09-22 Thread Kupido
Hi Walter, your method works fine with Scriptaculous effects, but I keep having the same problem with the following code: $('my-form').show(); // not appear, just display $('my-form').focusFirstElement(); The second function seems to be called when the form is still hidden, so the field doesn't

[Proto-Scripty] Re: Execute a function after another one

2010-09-23 Thread Kupido
to give   the browser a moment to acknowledge that the newly shown element is   really there. Form.focusFirstElement.delay(0.1,'my-form'); something like that... Walter On Sep 22, 2010, at 10:50 AM, Kupido wrote: Hi Walter, your method works fine with Scriptaculous effects, but I keep