Quantcast
Channel: Adobe Community : Popular Discussions - Archived Discussions
Viewing all articles
Browse latest Browse all 21156

onClick event

$
0
0
I want to open a new window when I click on an image. but nothing happens when I just add an alert in the onclick-event in my image.
the images was loaded via "browsing for files".

elem.innerHTML = '<div style="width:200px;float:left"><img src="' + src + '" width="150" height="100" onclick="alert(src)"; /></div';

I click and click and nothing happens. but when I load the image directly via <img>-tag everythings ok...is there a mistake in my code or what´s happening here?

Viewing all articles
Browse latest Browse all 21156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>