Hi list,
First, I have a textbox "username". I also have an Autocompleter'd
textbox
called "products".
Is there a "built in" way to have the Autocompleter's Ajax Request
pass the
value in the "username" field ?
(I tried adding "parameters: $F('username')" to the
Autocompleter's options,
but, that grabs the initial username value (which is blank), not the current
value.)
Thanks,
EJC
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
On 2/9/06, Ed C. <defeated2k4-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> (I tried adding "parameters: $F(''username'')" to the Autocompleter''s options, > but, that grabs the initial username value (which is blank), not the current > value.)Does Form.Element.getValue(''username'') work any better? Todd
No, that's what the $F() does ;)
I hacked Controls.js @ Line 330:
*//++++++++++++++++++++++++++++++++++++++++
**__dyp = this**.options.dynamParams;
if(__dyp) {*
* this.options.parameters += '&' + encodeURIComponent(__dyp) +
'='
+**encodeURIComponent($F(__dyp));
}
//++++++++++++++++++++++++++++++++++++++++*
Then, in my Autocompleter options parameter, I added:
*{ dynamParams: 'username' }*
On 2/9/06, Todd Ross <rails-spinoffs@brainsick.com>
wrote:>
> On 2/9/06, Ed C. <defeated2k4@gmail.com> wrote:
> > (I tried adding "parameters: $F('username')" to the
Autocompleter's
> options,
> > but, that grabs the initial username value (which is blank), not the
> current
> > value.)
>
> Does Form.Element.getValue('username') work any better?
>
> Todd
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
On 2/9/06, Ed C. <defeated2k4-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> No, that''s what the $F() does ;)Sorry! I read that as just $(''username''). I wasn''t paying attention (note to self: don''t catch up on e-mail while eating dinner). Todd