I have a page that has some sections that are available only with javascript. Please leave for now comments that I should make it available also without javascript.

The page has add details link. When user clicks it, it shows ajax pop up.
HTML Code:
<a href="javascript:void(0);" id="addDetails">Add details</a>
Is it ok to use javascript:void(0) or is there any better way (considering popup content can be accesses only with js)?

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?
HTML Code:
<a href="javascript:void(0);" onClick="addDetails(1,3)">Add details</a>