I am really new to javascript, and what I try to learn I can’t seem to retain. Anyway, I have some text that onclick will allow anyone to edit it. I was recently told that this field should only be editable for admins. I don’t know anything about the code or the website because it just became my project a couple weeks ago. Can anyone help?
You need to work out two things.
- How to determine that the page is being used by an admin
- How the edit is occurring, so that you can restrict it to only those admins.