function one(R) {
# do some thing..
$.ajax({
'url': '/one?search=' + R.val(),
#some thing common here
}
function two(R) {
# do some thing..
$.ajax({
'url': '/two?search=' + R.val(),
#some thing common here
}
well, since I'm just doing jQuery, but I guess this can get improve, refactor?