Re: 2 Newb Questions

Luke Ivers
Mon, 26 Feb 2007 18:39:26 -0000

So what you''re talking about is changing the place that the form
submits
whenever the hidden date field is changed?

If I''m reading that correctly, then all you should really need to do is
change your JS to be a function that does both what you are currently doing
(set the hiddendate value) and ALSO updates that form to change where it is
being submitted to... you could conceivably use observer_field here
(it''s a
Rails thing that allows you to make an ajax call if a field is updated) to
observe the hiddendate field and then use AJAX to change the form''s
submit
url, but you''d be probably better off having your JS update both the
hiddendate value, and the submit string for the form... this means you have
to hardcode in that form''s submit, OR use some further JS to take
whatever
is generated by Rails and just modify the part of the string that contains
the date=blah part.

On 2/26/07, Xavias
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:
>
>
> On thing to note about my above post - i''m not using the
> param[''hiddendate''] in the controller as a post param (so
i might have
> communicated this incorrectly to Luke) but instead i need to use the
> actual value stored in the hidden field (because, as you can see above,
> i change this dynamically w/ some DOM(JS))
>
> Any of this clear or what?
>
> --
> Posted via http://www.ruby-forum.com/.
>
> >