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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -