On Thu, Mar 10, 2011 at 12:04 PM, Me <[email protected]> wrote:

>
>
> On Wednesday, March 9, 2011 9:57:02 PM UTC-6, jim wrote:
>
>>
>>
>> On Thu, Mar 10, 2011 at 11:39 AM, Me <[email protected]> wrote:
>>
>>> Ok, is there another way to get this to work without going back to the
>>> server to just get a value from the select?
>>>
>>>
>> please don't top post.
>>
>> what are you trying to achieve? give use some code snippets.
>>
>
>       Here is the partial:
>       <div class="form_field code-column  ">
>   <% fields_for_exclusion_date(excluded_date) do |excluded_date_attr| %>
>     <%= excluded_date_attr.label :exclusion_date,'Excluded Date:' -%>
>        <%= excluded_date_attr.calendar_date_select :excluded_date, :class
> => "valid_from_date-input text-input",:value => value %>
>       <%= link_to_function "remove", "$(this).up('.form_field').remove()"
> %>
>     <% end %>
> </div>
>
>     Here is the view:
>
>     <%= select_tag :discout_code, options_for_select(@discount_
> codes)%><%= add_exclusion_date_link('Add Existing', Select value goes here
> ) %>
>
>>
>>
>
try updating the value attribute of the line that uses calendar_date_select
via js? so always render the partial
but on change of select value, update the value attribute.


> On Wednesday, March 9, 2011 9:20:20 PM UTC-6, jim wrote:
>>>
>>>>
>>>>
>>>> On Thu, Mar 10, 2011 at 9:43 AM, Me <[email protected]> wrote:
>>>>
>>>>> I have a view helper like ryan bates complex forms task helper, rails
>>>>> 2.2.2.  Anyway is there a way to send the value selected in a select menu 
>>>>> to
>>>>> the helper?  I am trying to do stuff without going back to the server.
>>>>>
>>>>>
>>>> if you're trying to use the value selected by the user in your helper
>>>> through js, you can't.
>>>> js is client side, helpers are server side.
>>>>
>>>>
>>>>>  <%= select_tag :discout_code, options_for_select(@discount_codes)%><%=
>>>>> add_exclusion_date_link('Add Existing', JS ) %>
>>>>>
>>>>> --
>>>>> 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 [email protected].
>>>>> To unsubscribe from this group, send email to
>>>>> [email protected].
>>>>>
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> -------------------------------------------------------------
>>>> visit my blog at http://jimlabs.heroku.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 [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> For more options, visit this group at
>>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>>
>>
>>
>>
>> --
>> -------------------------------------------------------------
>> visit my blog at http://jimlabs.heroku.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 [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>



-- 
-------------------------------------------------------------
visit my blog at http://jimlabs.heroku.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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to