<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js">
</script>
<script type="text/javascript">
$(document).ready(function(){
$("#click").click(function() {
showUser("Asia");
});
$(".country_press").click(function() {
alert('HELLO');
});
function showUser(str)
{
if (str=="")
{
document.getElementById("showlocation").innerHTML="";
return;
}
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("showlocation").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","location_country.php?q="+str,true);
xmlhttp.send();
}
});
</script>
</head>
<body>
<div id="click">CLICK ME</div>
<div id="showlocation"><b>Location Here</b></div>
</body>
</html>
This post has been edited by Atli: 28 January 2012 - 08:33 PM
Reason for edit:: Fixed the [code] tags.

New Topic/Question
Reply



MultiQuote



|