Hi All,
Can we access the value that will be entered in a text field, in the same JSP to enable/disable further fields(of the same form/JSP)?
For instance I've a jsp which has 3 fields. Depending on the value entered in the firstfield, I need to enable the third field(till then it has to be disabled)...
If yes, please let me know an example....
Thanks,
Karthik
Comments
:
: Can we access the value that will be entered in a text field, in the
: same JSP to enable/disable further fields(of the same form/JSP)?
:
: For instance I've a jsp which has 3 fields. Depending on the value
: entered in the firstfield, I need to enable the third field(till
: then it has to be disabled)...
:
:
: If yes, please let me know an example....
:
:
: Thanks,
: Karthik
:
You should use a script that executes in the browser to handle this type of validation. E.g., in javascript...
if( document.firstfield.value == 'John' )
{
document.thirdfield.disabled = true;
}
: :
: : Can we access the value that will be entered in a text field, in the
: : same JSP to enable/disable further fields(of the same form/JSP)?
: :
: : For instance I've a jsp which has 3 fields. Depending on the value
: : entered in the firstfield, I need to enable the third field(till
: : then it has to be disabled)...
: :
: :
: : If yes, please let me know an example....
: :
: :
: : Thanks,
: : Karthik
: :
: You should use a script that executes in the browser to handle this
: type of validation. E.g., in javascript...
: if( document.firstfield.value == 'John' )
: {
: document.thirdfield.disabled = true;
: }
Thanks....