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

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -