Skip to content
Advertisement

Adding onclick function in anchor tag which is not working [closed]

I am have made dropdown using bootstarap. I have added onlcick funtions in my anchor tags in dropdown. I just want make my text box readonly if one of the link is clicked on. I have used js to make text boxes read only. Please Help me to solve my problem. Below is my code:

JavaScript

My Java Script File:

JavaScript

Actually this is small part of java project. Hence I have used jsp and jstl. My file structure:

enter image description here

Advertisement

Answer

you are just assigning but declaring it, just need to make it true, so given id would be readonly, please find below snippets

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement