I am newbie in ajax.i want to send a normal ajax request when i will click the search button.i write some code the search onclick function..
$(document).ready(function() {
$("#Search").click(function() {
$.ajax({
"dataType": 'json',
"type": "POST",
"url": "../test/loginform_details.do",
"data": {
username: $('#username').val().toString(),
password: $('#password').val().toString(),
},
"success": function(data) {
fnCallback(data);
}
});
});
});
will that be ok??sholud i add fnCallback(data) in the success :function(data)??plz give some idea..