I am tryin to pass multiple values in the below method but I am unable to get this to work. What is the correct syntax? I have tried
data: ('keyword='+$(this).val(),'id='10),
and
data: {'keyword='+$(this).val(),'id='10},
and
data: {'keyword='+$(this).val(),'&id='10}//I have also tried to replace the curly braces with brackets.
This works so I think its a syntax problem?
data: ('keyword='+$(this).val())
Here is my complete request. I am using GET, I have tried using POST to no avail.
$.ajax({
type: "GET",
url: "showhints.php",
data: ('keyword='+$(this).val()),
beforeSend: function() {
$("#search-box").css("background","#FFF url(loading.gif) no-repeat 165px");
},
success: function(data) {
$("#suggesstion-box").show();
$("#suggesstion-box").html(data);
$("#search-box").css("background","#FFF");
}
});