You can get an idea on how to enable disable RVF based on a textbox value.
http://forums.asp.net/t/1346158.aspxBut i think you are having issues on identifying the control in java script. This can happen if your text box control is within some other controls. Then you have to send the full control hierarchy to javascript code. Enable 'trace' option in ASP to identify the full path to your textbox and try to send that path to your javascript and see.