Re: 2 Newb Questions

Luke Ivers
Mon, 26 Feb 2007 16:10:29 -0000

I might be completely misunderstanding, but I believe he''s asking how
to use
the value from hidden fields that were posted to the current page... as in:

<%= form_remote_tag :url => {:action => ''newlist'',
:store =>
params[:hiddenstore],
:today => params[:hiddendate]}, :update => ''mainfrm'',
 :complete => visual_effect(:bind_down, ''mainfrm''),
 :before   => %(Element.show(''spinner'')),
 :success  => %(Element.hide(''spinner'')) %>

On 2/26/07, Alex Wayne
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:
>
>
> Xavias wrote:
> > I want them in the ajax form tag as params - but i am not sure of the
> > syntax for this.
> >
> > <%= form_remote_tag :url => {:action =>
''newlist'', :store => @store,
> > :today => @today}, :update => ''mainfrm'',
> >   :complete => visual_effect(:bind_down,
''mainfrm''),
> >   :before   => %(Element.show(''spinner'')),
> >   :success  => %(Element.hide(''spinner'')) %>
> >
> > So instead of @store and @today up there i want to reference the
hidden
> > field so i can use the value set with some javascript dynamically.
> >
> > Is this possible?
>
> So you want them in url the form posts to?  Then you have the syntax
> right there.  That form would post to:
>
>   /some_controller/newlist?store=somestore&today=02-26-2007
>
> Assuming you don''t have any custom routes, of course.  If store
and
> today are params in the url then you don''t need your hidden
fields.
>
> --
> Posted via http://www.ruby-forum.com/.
>
> >