Dear members
i have this part of code in some jsp file
[CODE]
<td><input type=”text” [b]id=”preciounitarioventa” [/b]
value=”${articulo.precioUnitario}” size=”15″
[b]onfocus=”blanquearcampo(‘preciounitarioventa’)”[/b]
onblur=”redondear2decimalessalidacampo(‘preciounitarioventa’)” />
</td>
where in an extern .js file (ie a.js)
[CODE]
//onfocus=”blanquearcampo(”)”
function blanquearcampo(idtag){
document.getElementById(idtag).value=””;
}
the problem is in another extern .js (b.js)
i wrote
[CODE]
document.getElementById(“preciounitarioventa”).value=”TEST”;
[b]document.getElementById(“preciounitarioventa”).removeEventListener(‘onfocus’,blanquearcampo,false);[/b]
document.getElementById(“preciounitarioventa”).setAttribute(“readOnly”,”true”);
well the console, doesnt throw some error, but when i try to do click in the
field, the onfocus event still work , the value of the field is gone and now
readonly works really
what is wrong with my code in [B]removeEventListener
thanks in advanced