Also, how to use the values entered in the popup, in the javascript function: login_request() which is being called on click, which will send the AJAX request event
function login_request(data_to_send)
{
$.ajax({
type: 'post',
url: 'controller/action',
data: { key: "value" key_1: "value_1" },
success: function(data) {
// paste your code here after success
}
});
}
#in your config/route.rb
match 'controller/action', :to => 'controller#action' ,:via => [:get,:post] # i'm using get as well as post also.
#hope that help you. if you face any problem please let me know