last day (18 days later) » 

1:44 PM
1
A: jQuery ajax call from a numberfield using Rails is not working

RAJ ...First of all, in your js code replace var dateofbirth = $("#fixeddeposit_dateofbirth").val(); with // you have mentioned your dob field's id as 'dateofbirth' var dateofbirth = $("#dateofbirth").val(); In your controller, you need to call calculate_age method to have @age variable. Re...

 
Hi, Thanks for your reply. I have edited the code you suggested but this too is not working. . . :(
 
you need to show error that you are getting...
 
I am very new to RUBY ON RAILS and AJAX so i don't know how to see AJAX error.
 
You may check your rails server console or if it's on client side, you can check it in firebug (firefox) or just open your site in chrome and press F12, in console tab, you can see error by regenerating issue by following same steps
 
These two errors i'm getting (Uncaught ReferenceError: $ is not defined application.js:1 Failed to load resource: the server responded with a status of 404 (Not Found) localhost:3000/assets/defaults.js)
 
1:44 PM
You need to check your rails server console to know the reason of 404 and for $, you need to include jquery file in your application.js
hey Yogesh
 

  last day (18 days later) »