Iam trying to make some queries from database and trying to make filter from a map according to the country.
ive written the java script code and it works normaly and query php file as well. my problem just how to send a name with onclick function to start the query. the shown problem is always that the query variable is empty. the code as following :
<map name="Map" id="Map">
<area shape="poly" coords="948,4,454,927,452,932,454" value="USA" onclick="getCountry(this.value)" />
and javascript code which works fine:
function getCountry(value){
$.post("search.php"
,
{query:value},
function(data) {
$('#results').html(data);
});
}
the variable query in search.php comes always back with error that it didnt recieved any data.
thank you in advanced