I have a gallery section in my website, and I want to upload an image that's injected with JavaScript.
I need the JavaScript to run when it's opened and enlarged by a modal box. How can I do that?
I have a gallery section in my website, and I want to upload an image that's injected with JavaScript.
I need the JavaScript to run when it's opened and enlarged by a modal box. How can I do that?
Nope. Injection is not possible. To execute JavaScript when an image is loaded you can do
i = new Image();
i.onload = function() {}
i.src = '...';