Click to See Complete Forum and Search --> : Javascript


Ruchita.D
July 2nd, 2007, 02:52 AM
Hello Everybody,
I am working in C#,asp.net and i dont know anything about javascript
Would anyone please help me?
What i want is that whenever a user double clicks a textbox its readonly property should be set to false and the focus should be on that textbox. and on the lostfocus it should again become ReadOnly. How can i achieve this. Can anyone help me.
Thanks for your valuable reply.
Ruchita

Dr. Script
July 2nd, 2007, 08:16 AM
<input type="text" readonly="readonly" ondblclick="this.removeAttribute('readOnly'); this.focus()" onblur="setAttribute('readOnly',true)">