469,572 Members | 1,745 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,572 developers. It's quick & easy.

Making non editable controls editable on click of link


i have a issue in html.in a table,initially all the controls should be disabled.on click of edit link in each row,the respective row controls should be editable.
i have not used forms.pls help asap
Mar 25 '08 #1
1 1191
392 Expert 256MB
You should be able to find lots of examples of this by googling.

Basically to change the input fields status you want to do something like what is shown below. You will need to google for the exact CSS syntax for the style attribute to control read-only status. I do not remember exactly what it is off the top of my head.

Expand|Select|Wrap|Line Numbers
  2. <span onclick="changeReadOnly('someButton')" >edit</span>
  4. <input type="radio" id="someButton" />
  6. <script>
  7.     function changeReadOnly( elementId ) {
  8.         var inputElement = document.getElementById( elementId );
  9.         inputElement.style.readOnly = 'false';
  10.     }
  11. </script>
Mar 25 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Stephan Bour | last post: by
2 posts views Thread by Jesper Stocholm | last post: by
3 posts views Thread by Angela Chen | last post: by
2 posts views Thread by Alan Silver | last post: by
4 posts views Thread by biswaranjan.rath | last post: by
5 posts views Thread by Gui | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.