Reputation: 253
i've this element
<img onclick=zoomaImmagine(this) src="images/icon.png"/>
The problem is that i need to pass the event data too for retrieve the mouseX position. I tryied to write
onclick=zoomaImmagine(this,evt)
but the result is that it's undefined Any solution?
Upvotes: 0
Views: 78
Reputation: 2914
You could try
zoomaImmagine(this,event)
Since you were using evt,JavaScript was not able to determine what evt
meant and hence, it was throwing the undefined
error
Upvotes: 5