How to disable a t:inputText with javascript

I'm having great troubles to disable a t:inputText with a javascript function.

In my jsp i've got a t:inputText and one radio with an javascript event.

The javascript function is

function enableFilter(radio)

{

if (radio.value == "UOF"){

alert("uof");

document.getElementById('formulario:uof_code').disabled = false;

document.getElementById('formulario:up_code').diabled = true;

}else if (radio.value == "UP"){

alert("up");

document.getElementById('formulario:uof_code').disabled = true;

document.getElementById('formulario:up_code').disabled = false;

}

alert("uof_code" + document.getElementById('formulario:uof_code').disabled);

alert("up_code" + document.getElementById('formulario:up_code').disabled);

}

it only works fine when radio.value is "UOF", but when radio.value is "UP" it doesn't wok and i don't know why, because i think that the code is ok.

would you mind to help me? I don磘 know what i'm doing wrong.

Thanks a lot

[1067 byte] By [opaloa] at [2007-11-27 4:41:54]
# 1
the sintaxis was wrong. It works fine. Forget it.Thanks anyway
opaloa at 2007-7-12 9:53:22 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...