Re: 2 Newb Questions

Xavias
Mon, 26 Feb 2007 17:41:17 -0000

Luke Ivers wrote:
> 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'')) %>

I think Luke is the winner on this one guys - I only want to throw in
the hidden value as a param but the issue is that it never seems to
work. The example you have listed above runs but does not actually throw
in the hidden date value.

<form action="/entries/newlist?store=btc" method="post"
...

This to me feels like something is not right here. I''m a .net developer
during the day and wanted to play with rails on the side (and hope to
convincee the evil M$ only dev team to start using ruby for some small
things to start, etc) - sorry this seems so hard to communicate

I use the below to manipulate the hidden value and this is why i want
the form on submit to have this as the date param

document.getElementById(''hiddendate'').value =
formatDate(selectedDay,selectedMonth,selectedYear);

So Luke if this is the correct syntax do you know why it does not
include it in the action or onsubmit? I watch the above DOM change the
value of the hidden in firebug but don''t see any change in the form
action or onsubmit ... can''t figure out why this is so hard to figure
out

thanks for all the help on this guys