function jsfun(var1_name)
{
document.getElementById('txth1').value=var1_name;
$.ajax(
{
type: "POST",
data: "v="+var1_name,
url : localhost/code/application.php?fn=pfun,
success: function(y){
alert(y);
}
});
return false;
}
//write pfun function in www/code/application.php file
if(isset($_GET['fn']))
{
if($_GET['fn']=='pfun')
pfun();
else
exit;
}
function pfun(){
echo "here";exit;
}
?>