Hello all,
I am trying to pass variables in Ajax.Request method. I can see that we
can pass a single variable as:-
new Ajax.Request(''/controller/action?id=" + value +
"&status=JOINING'',
{asynchronous:true, evalScripts:true,
parameters:''resume[comment]='' +
$F(''resume_comment" + forward_value + "'')}); return
false;");
I hope that i am correct.. Now i want to pass the value of another
input.. whose id is joining_date1. And then i tried this way:-
new Ajax.Request(''/controller/action?id=" + value +
"&status=JOINING'',
{asynchronous:true, evalScripts:true,
parameters:''resume[comment]='' +
$F(''resume_comment" + forward_value + "''),
''joining_date='' +
$F(''joining_date" + forward_value + "'')}); return
false;");
But now both of the variables are not passing.. Can you guys give me
some light that what i am missing here .. ?
-- 
Posted via http://www.ruby-forum.com/.
-- 
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
Hemant Bhargava wrote:> Hello all,> But now both of the variables are not passing.. Can you guys give me > some light that what i am missing here .. ?Anyone listening me.. :) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
This is Prototype, not Rails, which is probably the reason for the
lack of responses.
The API is here:
http://www.prototypejs.org/api/ajax/options
My guess is that you need to replace the comma with a plus operator
and prepend the second parameter with a &
new Ajax.Request(''/controller/action?id=" + value +
"&status=JOINING'',
{asynchronous:true, evalScripts:true,
parameters:''resume[comment]='' +
$F(''resume_comment" + forward_value + "'') +
''&joining_date='' +
$F(''joining_date" + forward_value + "'')}); return
false;");
On Apr 23, 9:15 am, Hemant Bhargava
<li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>
wrote:> Hemant Bhargava wrote:
> > Hello all,
> > But now both of the variables are not passing.. Can you guys give me
> > some light that what i am missing here .. ?
>
> Anyone listening me.. :)
>
> --
> Posted viahttp://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
> To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit this group
athttp://groups.google.com/group/rubyonrails-talk?hl=en.
-- 
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
Sharagoz wrote:> This is Prototype, not Rails, which is probably the reason for the > lack of responses. > The API is here: > http://www.prototypejs.org/api/ajax/options > > My guess is that you need to replace the comma with a plus operator > and prepend the second parameter with a & > > new Ajax.Request(''/controller/action?id=" + value + "&status=JOINING'', > {asynchronous:true, evalScripts:true, parameters:''resume[comment]='' + > $F(''resume_comment" + forward_value + "'') + ''&joining_date='' + > $F(''joining_date" + forward_value + "'')}); return false;");Ohh.. yeah yeah.. you are correct.. That was the thing i was missing.. Thanks with a big smile.. :) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.