471,888 Members | 2,466 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,888 software developers and data experts.

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 1221
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 YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.