22 Dec '12, 3am

How to pass updating javascript variable into form to controller in Ruby on Rails?: I have the following javascr...

I have the following javascript: <script type="text/javascript" charset="utf-8"> $(function() { $( "#slider-range" ).slider({ range: true, min: 200, max: 2000, values: [ 800, 1200 ], slide: function( event, ui ) { $( "#amount" ).val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] ); } }); $( "#amount" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) + " - $" + $( "#slider-range" ).slider( "values", 1 ) ); }); The code creates a price range and a slider bar, price range slides as user moves bar. I want to pass the min price and max price into the form like: <%= form_tag laptops_path, :method => 'get' do %> <%= hidden_field_tag "amount", params[:amount] %> <%= submit_tag "Search", :name => nil %> But when I do so, the "amount" is still coming blank when submitted. Any ideas why?

Full article: http://stackoverflow.com/questions/13999731/how-to-pass-u...

Tweets

#Job

freelancer.com 23 Dec '12, 5am

We have an immediate need for an experienced RoR developer. This initial project will involve tying an existing JS schedul...

Adding html tag in ruby on rails controller: Ho...

stackoverflow.com 26 Dec '12, 10am

How do I add html tag in ruby on rails controller? I want to add this statement include a_tag in ruby on rails controller....

Form for Hamsterley Forest Marathon on Jul 6th ...

northeastraces.com 25 Dec '12, 11am

"venue is Croft Farm"; "based in the beautiful Buttermere valley set amidst a dramatic landscape of high fells, this is a ...

Programador Ruby On Rails en Denbolan Barcelona...

domestika.org 21 Dec '12, 3pm

Importante empresa de tecnología móvil del sector salud, con más de 20 años de experiencia en el desarrollo de aplicacione...

Online the slides of my talk at @florenceonruby...

slideshare.net 19 Dec '12, 9pm

What’s new in ruby on rails 4 Presentation Transcript Whats new inRuby on Rails 4 A RoR 4 press review @silviorelli Spoile...

ruby on rails - Use jquery to check which form ...

stackoverflow.com 31 Dec '12, 1pm

I have two forms that make a separate requests to different apis. What i am trying to achieve is to maybe have jquery chec...