I am facing a difficulty with setting readonly property for a text box through radio buttons.
Example
----------
Imagine there is a text box which shows the value from the database (say : height). Now this text box will be in the readonly mode intially. Below that text box we have an option Edit Now Yes or No (two radio buttons)When the user clicks on the Yes the textbox must be editable, but incase he edits it and then click back on No, the earlier default value (ie) the value from the database must get back into it and the textbox must become readonly. So when I submit the page, the value doesnt get affected.
I am coding using JSP, but if some one can help me on the Javascript it will be very helpful.
Thanx a lot in advance...
Tommy...
Example
----------
Imagine there is a text box which shows the value from the database (say : height). Now this text box will be in the readonly mode intially. Below that text box we have an option Edit Now Yes or No (two radio buttons)When the user clicks on the Yes the textbox must be editable, but incase he edits it and then click back on No, the earlier default value (ie) the value from the database must get back into it and the textbox must become readonly. So when I submit the page, the value doesnt get affected.
I am coding using JSP, but if some one can help me on the Javascript it will be very helpful.
Thanx a lot in advance...
Tommy...