jquery - Accessing form values using javascript in Ruby on Rails -
let's have input box, on client-side, want access value of input box , check if exists record in model. if so, want data shown. however, want done without clicking submit button/reloading page.
can show me sample code?
sample code frowned upon in these parts, can give outline of do. use jquery value of input box, , submit using ajax request url. map url controller action checks see if record exists in db, , return json indicates whether or not. in javascript, when data returned, can display user.
Comments
Post a Comment