The page has add details link. When user clicks it, it shows ajax pop up.
The above example done also with defining new fucntion and using onClick. Would be this still be considered as a proper way? Why some people are saying that I should not use onClick?
And if this is not a proper (best practice) way. What if user need to pass also some arguments, like the following?