ho risolto...

anche se non capisco il perchè di questo comportamento...

...solamente applicando 2 volte il focus funziona:

codice:
var xmlHttp2

function showcodice2(str) { 
  xmlHttp2=GetXmlHttpObject2();

  if (xmlHttp2==null)   {
    alert ("Your browser does not support AJAX!");
    return;
  } 
  var url2="getcodice2.asp";
  url2=url2+"?q="+str;
  url2=url2+"&sid="+Math.random();
  xmlHttp2.onreadystatechange=stateChangedcodice2;
  xmlHttp2.open("GET",url2,true);
  xmlHttp2.send(null);
}

function stateChangedcodice2() { 
  if (xmlHttp2.readyState==4) { 
    document.getElementById("txtHintcodice2").innerHTML=xmlHttp2.responseText;
document.data.prezzo2.focus();
  }
document.data.prezzo2.focus();
}

function GetXmlHttpObject2() {
  var xmlHttp2=null;
  try {
    // Firefox, Opera 8.0+, Safari
    xmlHttp2=new XMLHttpRequest();
  }
  catch (e) {
  // Internet Explorer
    try {
      xmlHttp2=new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (e) {
      xmlHttp2=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
  return xmlHttp2;
}