Bueno creo que no fui muy claro dejo el codigo completo aver si se entiende 
Lo que quiero hacer es una tonteria pero no me sale, al picar en el costo me sale un imput para editarlo pero al picar en el input para ingresar el dato se vuelve a activar el javascript que estoy haciento mal, ya se que es una duda media tonta pero no lo entiendo 
 
  
en el lado del cliente tengo 
cliente.php
<script language="javascript"  type="text/javascript">
var esto; 
var estado;
estado=0; 
function objetus() { 
        try { 
                xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
        } catch (e) { 
                try { 
                         xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
                } catch (E) { 
                         xmlhttp = false; 
                } 
        } 
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') { 
                xmlhttp = new XMLHttpRequest(); 
        } 
        return xmlhttp 
}  
function primer_tope(id){
//if (estado==0) { 
       esto=id;
     _objetus=objetus()   
     _values_send="funcion=pt&codigo="+document.getElem  entById('prueba').innerHTML+"&id="+esto;  
     _URL_="procesador.php?" 
     _loader=document.getElementById(id) 
    _objetus.open("GET",_URL_+"&"+_values_send,true); 
    _objetus.onreadystatechange=function() { 
        if (_objetus.readyState==4){ 
                 if(_objetus.status==200){ 
                 document.getElementById('prueba').innerHTML=_objet  us.responseText;
                 } 
        } 
    } 
    _objetus.send(null);
//	estado=1;
// }  
}  
function guardar(data){ 
    id=esto;
    _objetus=objetus()   
    _values_send="funcion=gr&codigo="+document.getElem  entById(data+'_input').value   
    _URL_="procesador.php?" 
    _loader=document.getElementById(id+'b') 
    _objetus.open("GET",_URL_+"&"+_values_send,true); 
    _objetus.onreadystatechange=function() {  
        if (_objetus.readyState==4){ 
                 if(_objetus.status==200){ 
                 target=id       
                 document.getElementById('prueba').innerHTML=_objet  us.responseText; 
                  } 
        } 
    } 
      document.getElementById(id).style.display='' 
    estado=0;  
    _objetus.send(null);
} 
</script>  
<table border=1>
	<tr>
		<th>
			Codigo
		</th>
		<th>
			Descripcion
		</th>
		<th>
			Costo
		</th>
	</tr>
	<tr>		
		<td>
			00132
		</td>
		<td>
			Ejemplo
		</td>
		<td >
			<div id="prueba"  onclick="primer_tope(this.id);">
			30.20
			</div>
		</td>
	</tr>
</table>			 
del lado del servidor  
procesador.php
<?php  
if(isset($_GET['funcion'])){ 
    $_codigo=$_GET['codigo']; 
    $_valor=$_GET['funcion']; 
    $_id=$_GET['id'];  
	if($_valor=="pt"){ 
		//        $_pt="Tu ip: ".htmlspecialchars($_SERVER['REMOTE_ADDR'])."\n"; 
		//        $_pt.="request_uri: ".htmlspecialchars($_SERVER['REQUEST_URI'])."\n"; 
		//        $_pt.="date(): ".htmlspecialchars(date("d-m-Y : H-i-s"))."\n"; 
 		$_pt="<div id=nu>\n"; 
 		$_pt.="<table border=1>\n"; 
 		$_pt.="<tr>\n"; 
 		$_pt.="<td>".$_id."\n";
 		$_pt.='<input id="'.$_id.'_input" name="'.$_id.'_input" size="5" maxlength="5" value="'.$_codigo.'">';
 		$_pt.="</td>\n"; 
 		$_pt.="</tr>\n"; 
 		$_pt.="<tr>\n"; 
 		$_pt.="<td>\n";
 		$_pt.='<img src="images/save.gif" alt="Guardar"  onclick="guardar(\''.$_id.'\');"  style="cursor:pointer"> <img src="images/cancel.gif" alt="Cancelar" onClick="" style="cursor:pointer">';
 		$_pt.="</td>\n";
 		$_pt.="</tr>\n"; 
 		$_pt.="</table>\n"; 
 		$_pt.="</div>\n"; 
		echo $_pt; 
	} elseif ($_valor=="gr") { 
		$_pt=$_codigo."\n"; 
     		echo $_pt; 
	} elseif ($_valor=="ptxml"){ 
        	$_xml="<?xml version=\"1.0\" standalone=\"yes\"?>\n"; 
        	$_xml.="<serv>\n"; 
        	$_xml.="<ip>Tu ip: ".htmlspecialchars($_SERVER['REMOTE_ADDR'])."</ip>\n"; 
        	$_xml.="<uri>request_uri: ".htmlspecialchars($_SERVER['REQUEST_URI'])."</uri>\n"; 
        	$_xml.="<date>date(): ".htmlspecialchars(date("d-m-Y : H-i-s"))."</date>\n"; 
        	$_xml.="</serv>\n"; 
        	header('Content-Type: text/xml'); 
        	echo $_xml; 
 	} else { 
        	echo "No enviaste ningun valor ACEPTABLE"; 
 	} 
} else{ 
	echo "No se a enviado valor alguno de peticion"; 
} 
?>