It's because you're calling your event handler function instead of passing a function when you try to add the event listener.
ob.addEventListener("click", function() { onCl1(idTable[0],idTable); });
Anytime you write functionName( argument, argument, ... )
the function will be called at that point in the code. That's whats going on in your code; there are no magic rules for calls to addEventListener()
. Thus you have to wrap your function call with your parameters in another function, and pass that function as the second argument.