[Proto-Scripty] Re: using with statement

2010-04-30 Thread T.J. Crowder
Hi, is there a way that I can get rid of all these usages of this No. `this` is different in Javascript than in some other languages with the same keyword, in several ways. One of these is that unqualified references like your _div (without anything in front of it) are not automatically

[Proto-Scripty] Drag and Drop Problem

2010-04-30 Thread Sarbjeet Singh
Hi All, I have a drag and drop functionality developed where I have multiple dragables and multiple dropables. Where the Dragable is Droped on a Dropable. I also need to have the functionality where I should be able to revert the dragable that means once the dragable is on dropable i should be

Re: [Proto-Scripty] Do I stop observing events on element with Ajax.Autocompleter using Event.stopObserving()

2010-04-30 Thread Sébastien Gruhier
Hi I'll add a Ajax.Autocompleter#release method like this. Ajax.Autocompleter.addMethods({ release: function() { this.element.stopObserving(); } }); http://gist.github.com/384853 On Apr 29, 2010, at 7:29 PM, kimbaudi wrote: Hi, I have a form with multiple text inputs (i.e. input

[Proto-Scripty] Re: Can we use Prototype 1.7.1 RC1 with Rails 3 beta

2010-04-30 Thread Joshua Partogi
Hi all, A quick update from me about Rails 3 beta and Prototype. I've just tried Rails 3 beta with Prototype 1.6 and it doesn't work. Infact it works with Prototype 1.7.1. So I guess Rails 3 beta is built against Prototype 1.7 Kind regards, Joshua -- http://twitter.com/scrum8 On Apr 26, 8:06

Re: [Proto-Scripty] Re: using with statement

2010-04-30 Thread Ran Berenfeld
Thanks a lot for your reply T.J I was partially familiar with this mechanism, and now I know more :) anyway, let me re-phrase my question we all know that an event received on a DOM element (i.e button onclick event for example) will have the this equals to the DOM element my question is simple :

Re: [Proto-Scripty] Do I stop observing events on element with Ajax.Autocompleter using Event.stopObserving()

2010-04-30 Thread Paul Kim
Thank you for your solution. Now my form removes Ajax.Autocompleter when I remove a form element. On Thu, Apr 29, 2010 at 11:49 PM, Sébastien Gruhier sgruh...@gmail.comwrote: Hi I'll add a Ajax.Autocompleter#release method like this. Ajax.Autocompleter.addMethods({ release: function() {

[Proto-Scripty] Carousel prototype problem from 1.6.1 to 1.7_rc1

2010-04-30 Thread F.Buratti
I'm using the script by Victor Stanciu (http://code.google.com/p/ prototype-carousel/) but I can not get it to work correctly with the new release candidate of Prototype 1.7. the problem is that the carousel stops and do not see the last two slides, I'm trying but have not yet found the bug I

[Proto-Scripty] Getting the value of a form field

2010-04-30 Thread Shane McCarron
I am sure this is just ignorance on my part, but... I would really like to $F('formField') to get the value of whatever field I am interested in. However, it seems formField needs to be the field's ID, not its Name. That's cool, except when I have Radio Buttons or Check Boxes. You aren't

RE: [Proto-Scripty] Getting the value of a form field

2010-04-30 Thread Jonathan Rosenberg
I think this might work. You could wrap it up into a function, of course, with name as a parameter. $$('input[type=radio][name=whatever]').find(function(radio) { return radio.checked; }).value; -- Jonathan Rosenberg Founder Executive Director, Tabby's Place

[Proto-Scripty] outside the IFRAME

2010-04-30 Thread Hariz Soleminio
Hello, Is this possible I inserted an IFRAME in a page. the i frame i inserted contains HTML with protoype/javascript codes. below is the javascript code Event.observe(document, 'keyup', keyupcheck, false); im observing the window in any keyup events. however it only works within the iframe

Re: [Proto-Scripty] Getting the value of a form field

2010-04-30 Thread Shane McCarron
Clever! I will try that. Another approach that might work for some is to serialize the form data into a hash. Then you should have the values for each form control indexed by their name. var h = $('formId').serialize( true ) ; Then, for a form control with a name of 'name' you can do: if

[Proto-Scripty] Re: Getting the value of a form field

2010-04-30 Thread joe t.
Similar to a prior response using a CSS selector, but eliminating the call to #find: // Returns single value of the checked radio var value = $F($$('input:checked[type=radio][name=groupName]')[0]) The :checked pseudo-class shortcuts to the checked element(s) in the selector results. However, in