I have an element with an onclick method.
I would like to activate that method (or: fake a click on this element) within another function.
I
You can also try getting the element's onclick attribute and then passing into eval. This should work despite the big taboo over eval. I put a sample below
eval(document.getElementById('elementId').getAttribute('onclick'));