function showUser25(str1)
{
if (str1=="")
{
document.getElementById("words").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("words").innerHTML=xmlhttp .responseText;
}
}
xmlhttp.open("GET","wordCount.php?p="+str1,true);
xmlhttp.send();
}
function showUser26(str1)
{
if (str1=="")
{
document.getElementById("orderprice").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("orderprice").innerHTML=xm lhttp.responseText;
}
}
xmlhttp.open("GET","wordCalculate.php?p="+str1,tru e);
xmlhttp.send();
}
I want to combine both these functions please help so that i can call only one function at onchange or onKeyUp