enrique barraorion
2006-Jun-21 23:31 UTC
[Rails] how can I get the value of a hidden field and pass it
My problem is that I want to pass a date information form one page to another. And that information came to my page in an Ajax petition. My idea to accomplish this is that the date can come in the Ajax response as a hidden field and when I click a link I can get that hidden field value and pass it to the action in rails as a param. I have done all this. I have the date in a hidden field and I have access to that field with "document.hidden_form.hidden_date.value" but I don''t know how to introduce this value in a rails variable as @date to pass it with <%= link_to ''New event'', :action => ''new'' , :date_start_day=>@date%> thank you in advance if you have any other idea about how to pass that information from an Ajax response to another page please tell me I have no more ideas -- Posted via http://www.ruby-forum.com/.
dgarcia
2006-Jun-22 01:29 UTC
[Rails] Re: how can I get the value of a hidden field and pass it
enrique barraorion wrote:> My problem is that I want to pass a date information form one page to > another. And that information came to my page in an Ajax petition. > My idea to accomplish this is that the date can come in the Ajax > response as a hidden field and when I click a link I can get that hidden > field value and pass it to the action in rails as a param. > I have done all this. I have the date in a hidden field and I have > access to that field with "document.hidden_form.hidden_date.value" but I > don''t know how to introduce this value in a rails variable as @date to > pass it with > <%= link_to ''New event'', :action => ''new'' , :date_start_day=>@date%> > > thank you in advance > > if you have any other idea about how to pass that information from an > Ajax response to another page please tell me I have no more ideas<%= link_to ''New event'', :action => ''new'' ,:with => "''ate_start_day='' + Form.Element.getValue(''hidden_field_parameter'')"%> -- Posted via http://www.ruby-forum.com/.
Seemingly Similar Threads
- rails saves it to the database and I don''t want to
- uninitialized constant Datetime
- Ajax not working on ie and konkeror
- Singaporean Mr. Teo En Ming's Refugee Seeking Attempts, In Search of a Substantially Better Life
- Ogg Vorbis in Creative products petition