Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • @ViolinFour- hello, it somehow works, but it only enables the very first row/input field. If I clicked on next or more rows then it does not enable specific input text. Is there a way to resolve this please? Commented Aug 12, 2022 at 6:08
  • @CoderCodes: Make sure that you're using the right id in buttonclicked. buttonclicked as is will only enable the input field with the id "gradeid". Commented Aug 12, 2022 at 6:11
  • id is correct, sir. But the input text field is on loop that is why it only enables the first input text. I have updated my question. The id is always 1 Commented Aug 12, 2022 at 6:13
  • Try passing the td element and using the children property. I've edited my answer. Commented Aug 12, 2022 at 6:19
  • It's best to give elements unique ids. document.getElementById will probably only return the first occurence of that id. Commented Aug 12, 2022 at 6:25