Re: 2 Newb Questions

Alex Wayne
Mon, 26 Feb 2007 16:04:23 -0000

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.