I have an image and it initially does not do anything if a user clicks on it, is it possible that If the user clicks on another button, the onclick attribute of the image changes to some function so that if he clicks on image later, the onclick function assigned to image gets executed?
Problem -> When I click on button, a function is called in which I change the onclick attribute with the below code->
Without even clicking on the image, this function is executed. And when the image is clicked, nothing happens!
I have also tried this ->
In this case, when user clicks on image, nothing happens.